[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Apostrophe (') in Full-Text Search String SQL server-2016

SELECT * FROM [dbo].[FTSearch] WHERE contains(Context,  'formsof (inflectional,"student''s")  ')
i need to access Apostrophe (') in contains method
Changing the apostrophe into two apostrophes won't work (student''s Document). Been there. Done that. Can't do...

my accepting Result sholud be like
Student's Document
Student's Site
Student's Result.....................Something like this   so my need is that How can I make my full-text search support the apostrophe? If it is indeed not possible, can you provide a link to an article that concludes/proves that MS SQL Server full-text search does not support the apostrophe in the search string?

Thanks In Advance:-)
0
Shubham Viramgama
Asked:
Shubham Viramgama
1 Solution
 
ste5anSenior DeveloperCommented:
Why not searching for "student"? And for the plural form use an additional LIKE.
0
 
ZberteocCommented:
Try this:
SELECT * FROM [dbo].[FTSearch] WHERE contains(Context,  'formsof (inflectional,"student")  ') and Context like '%student''s%'

Open in new window

1
 
Randy PooleCommented:
Just double up on the single quote since it is inside single quotes
SELECT * FROM [dbo].[FTSearch] WHERE contains(Context,  'formsof (inflectional,"student''''s")  ')

Open in new window

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Andy WoodwardSenior Applications EngineerCommented:
Could you simply replace the ' with a ascii character for a ', char(39) so the result would be ('Student' + char(39) + 's Document')
0
 
Shubham ViramgamaJunior Software DeveloperAuthor Commented:
Thanks all of you for the reply..
0
 
Shubham ViramgamaJunior Software DeveloperAuthor Commented:
Thanks for the Solution. it's really helped me. Thanks Again.!!!!:-)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now