February 7th, 2004, 04:40 PM
read split variables from ASP
I dont know if I am explaing this right.... but I will give it a shot.
I have a table which has a list of users in it. One of the fields (tracklist) contains a comma seperated list ("1003,1010,1020,1030") of numbers that goes with a field in another table (tracks).
I have a ASP Page that creates a list of check boxes using the IDs in the track list. When the form passes it it combines them all to be "1000,1001,1003,1010" Depending on which checkboxes you selected.
What I want to do is find a single SQL Select statement that will split up each of the numbers in the form and check to see if any of them are in the tracklist field.
This little bit has me all confused and I was wondering if anyone knows a quick down and dirty way to do this. Or if it is even possible in plain SQL. If not, I will have to write more in ASP to accomplish the task. But I would like to limit the number of SQL Statements.