question

jasmy avatar image
jasmy asked

Contains table search doesnt work

SELECT [KEY] AS User_ID,[Rank] AS RNK FROM CONTAINSTABLE([dbo].[FIS_User],(First_Name,Last_Name,Email_ID),'" *dmaujrilio.sampajolesi@med.kuleuven.be*"') This query doesnt return the result. Need Or Match and Exact match
sql-server-2008
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
You have wild cards in place within the double quotes that are going to cause it to look only for those wild card, *. You don't need those. Try it without them. In fact, I don't think you need the double quotes either, but I can't test it on your system, you can try both.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jasmy avatar image jasmy commented ·
Thank you ,Grant Fritchey But those two suggestions work for the above search. But i try to search **SELECT [KEY] AS User_ID,[Rank] AS RNK FROM CONTAINSTABLE([dbo].[FIS_User], (First_Name,Last_Name,Email_ID),'maeurilio.sampaolesi@med.kuleuve')** doesn't work. I have the email 'maeurilio.sampaolesi@med.kuleuven.be' in My DB If i search **SELECT [KEY] AS User_ID,[Rank] AS RNK FROM CONTAINSTABLE([dbo].[FIS_User], (First_Name,Last_Name,Email_ID),'maurilio.sampaolesi@med.kuleuven')** Till **maurilio.sampaolesi@med.kuleuven** this also will work.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.