Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is not working please help..
SQL
SELECT * FROM Company c WHERE 1=1 and CONTAINS  (c.FullCompanyName, ' "Baresso*" AND "Coffe*" AND "A/S*"')

it is not giving output with Baresso Coffe A/S
Posted
Updated 20-Sep-12 23:08pm
v2

1 solution

Not sure what king of WHERE clause you have written!
WHERE 1=1 ?

Try:
SQL
SELECT 
   * 
FROM 
   Company c 
WHERE 
   c.FullCompanyName LIKE '%Baresso%'

Above query will fetch the records for company name that has Baresso in it.

UPDATE:
Alternative:
SQL
SELECT 
   * 
FROM 
   Company c 
WHERE 
   CONTAINS  (c.FullCompanyName, 'Baresso' AND 'Coffe' AND 'A/S')

Refer: MSDN: Full-Text Search (SQL Server)[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900