Forums

This topic is locked

SQL sorting method with comma seperated values

Posted 18 Dec 2003 17:02:16
1
has voted
18 Dec 2003 17:02:16 Martin Sagerstrand posted:
Hi there,

I want to create an sql statement to retrieve data from a table that are sorted by comma separated values how can I do that?

I thought some thing like this would do the trick but it didn't work:

SELECT *
FROM tb_documents
WHERE Documents LIKE '1, 2'

I want to sort the unique ID column! 1, 2 that is later going to be an in parameter that I will pass on to this page:

SELECT *
FROM tb_documents
WHERE Documents LIKE 'varID'

Regards
Martin

Reply to this topic