There's no nice way that I know of (putting a list in a field is a
relational database no-no); the specific kludge would depend on what sort of
database you're using.

-----Original Message-----
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 7:33 AM
To: CF-Talk
Subject: OT: SQL question


Whew . . . I'm still in one piece after that wind last night . . .

What's the best way to query a column in a table that has a comma delimited
list?

For example, in the query below:  If B_xRef is a comma delimited list,
what's the most effecient way to find all the Table_b rows that contain the
value of A_xRef (which is a single value)

SELECT A.A_xRef, B.B_xRef
FROM Table_a A, Table_b B
WHERE A.A_xRef IN B.B_xRef  (or something to this effect?)

Thanks,
Dave



=================================
"What we need is a list of specific unknown problems we will encounter"

David Hannum
Web Analyst/Programmer
Ohio University
[EMAIL PROTECTED]
(740) 597-2524
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to