PDA

View Full Version : "in" query


robojob
02-10-2008, 08:49 PM
Hi,

I have a col in my DB that has comma seperated values, eg. 2,17,5,6

i want to query the db with a single variable and pull out all records where that value is present in the comma seperated string...

i am sure that this is an "in" query but cant get it to work...

some of the rows might only have a single number in them.

Any ideas?

Fumigator
02-11-2008, 01:49 AM
Show us what you're tried.

StupidRalph
02-11-2008, 03:38 AM
I have a col in my DB that has comma seperated values, eg. 2,17,5,6

First mistake. See. http://www.guelphdad.wefixtech.co.uk/sqlhelp/lists.shtml
Any ideas?
Normalise your database.