[thelist] SQL (or ASP?) selecting from a multi-valued column

Elfur Logadottir elfur at lists.evolt.org
Mon Feb 5 17:59:37 CST 2001


From: <lanehol at bellsouth.net>


| Hmmm ...
|
| If you are using MSSQL then you could try:

I'm using Access, but don't ask why, 'cause then I have to
pleed ignorance, and I hate that :-)

| "select * from display where [cat] in (" &
CommaSeparatedList & ") order by [name]"
|
| Note that the CommaSeparatedList must be delimited (with
single or double quotes) if [cat] is a char value or with
date delimiters if [cat] is a date.
|

this looks too complicated for me, how does this work, in
plain english.

cat is the field with the multi-values, so should I do:
"select * from display where [1] in (" & cat & ") ... "

if I do it like above, I have to have either single quotes
or double double quotes, but each attempt returns "No value
given for one or more required parameters"

thank you for your effort, but I really think I need to
reconsider my structure on the DB

*the frustrating one rests*
elfur.is





More information about the thelist mailing list