Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Comma separated Keyword Search

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-10 : 07:53:39
Annant Srivastava writes "I have built a job site where I need a comma separated keywords to be searched from a column in a table. I need a stored procedure which takes the parameter as keywords separated by commas and should return the rows where either of the keywords are present in that table."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-10 : 08:02:42
Try this

Select Columns from yourTable where ','+@colList+',' like '%,'+Column+',%'

and refer this
http://sqlteam.com/forums/topic.asp?TOPIC_ID=55983

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -