There isn't really a good way, because this not a
RDBMS-friendly way of storing the data.
Once the list is stored in a database, it's just a text field
like any other.CF knows that a string can also be a list,
but SQL doesn't. You would need to normalise the data,
i.e. store each item in the list as a separate record,
if you're after an efficent solution.
Nick
-----Original Message-----
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 12:33 PM
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