We have an MSSQL/2000 database where several columns contain comma-delimited lists of data.  For example:

Sample row from table:
Group1=1,5,7,9
Group2=3,8
Group3=4

We want to allow someone to search the database based on these columns so that if someone searched on

Group1=1,7
Group2=3
Group3=4

Then it would find the sample row shown above.  It would also return that row in the results if the user chose:

Group1=1
Group2=8
Group3=4

But, if the user selects:

Group1=1,2,5,7,9
Group2=3,8
Group3=4

Then that row would not be included in the results.

I'm having a heck of a time trying to figure out how to write the SELECT statement for this.  Any ideas?

Thanks,

--
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc. - www.CoolFusion.com
inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server
PrismAV - Virus scanning for ColdFusion applications
>>> Find out how iMS Stacks up to the competition: http://www.coolfusion.com/imssecomparison.cfm
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to