WHERE ',' + name + ',' LIKE cfqueryparam cfsqltype=CF_SQL_VARCHAR
value=%,Ted,%
The + is the concatenator and may be something else depending on your
db. If you have different values for that field, you might consider
using a related table instead of a comma delimited list.
-Original
The first thing I would do is rework the database structure. Using the like
'%blah%' will get you results but is horrendously slow.
You should have a join/junction/your preferred term table that does this for
you.
Adam
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
: RE: Querying a comma delimited field
WHERE ',' + name + ',' LIKE cfqueryparam cfsqltype=CF_SQL_VARCHAR
value=%,Ted,%
The + is the concatenator and may be something else depending on your
db. If you have different values for that field, you might consider
using a related table instead of a comma
I think that only works like:
WHERE column IN ('val1','val2')
-Original Message-
From: Burns, John [mailto:[EMAIL PROTECTED]
Sent: vrijdag 5 maart 2004 16:01
To: CF-Talk
Subject: RE: Querying a comma delimited field
I think there's also an in command.
Where 'ted' in name
4 matches
Mail list logo