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 seperated list query

Author  Topic 

zubair
Yak Posting Veteran

67 Posts

Posted - 2004-01-27 : 07:37:11
hi i have a table with a filed that holds comma seperated numbers i.e
120,142,156 etc

What i would like is to wright a query that returns the row if any of the numbers in this field matched a certain criteria.

For example my criterialist = 120,121 and 142.

Now i want to compare the field with my criteria list and if any of the numbers in the comma seperated field matched a number in the criteria list i want to select it.

Hope it makes sense
Thanks

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-01-27 : 09:39:41
Perhaps the following link will help:

http://www.sqlteam.com/item.asp?ItemID=11499

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-01-27 : 11:49:56
And the NUMBER ONE asked question on SQLTeam is......

Drum roll please.....

Actually I wonder which one is...

This is certainly top 5.....

although it's been a while, I guess....



Brett

8-)
Go to Top of Page
   

- Advertisement -