Guest_imported
New member
- Jan 1, 1970
- 0
I have created a full-text catalogue for a CustomerList table, and I tried to execute the following query to find all records whose CompanyName field contains the string "Gold's Gym." In a normal select statement, you'd do something like this:
SELECT * FROM CustomerList WHERE CompanyName LIKE '%Gold''s Gym%'
But, since we are using the full-text catalogue, we have to use the contains clause. So I tried this:
SELECT * FROM Customerist WHERE FREETEXT(CompanyName,'Gold''s Gym')
That gives me an error:
Syntax error in search parameter 'Gold's Gym'
So obviously, SQL is interpretting the double sinel-quotes as a literal single quote, but it's not liking it. Why is that? Thanks in advance.
SELECT * FROM CustomerList WHERE CompanyName LIKE '%Gold''s Gym%'
But, since we are using the full-text catalogue, we have to use the contains clause. So I tried this:
SELECT * FROM Customerist WHERE FREETEXT(CompanyName,'Gold''s Gym')
That gives me an error:
Syntax error in search parameter 'Gold's Gym'
So obviously, SQL is interpretting the double sinel-quotes as a literal single quote, but it's not liking it. Why is that? Thanks in advance.