If it's SQL you cold use the Like statement perhaps:
SELECT A.A_xRef, B.B_xRef
FROM Table_a A, Table_b B
WHERE B.B_xRef LIKE '%' + A.A_xRef + '%'
but it aint that efficient
------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
http://www.thoughtbubble.net
------------------------------------------------------------------
United Kingdom
http://www.thoughtbubble.co.uk/
Tel: +44 (0) 20 7387 8890
------------------------------------------------------------------
New Zealand
http://www.thoughtbubble.co.nz/
Tel: +64 (0) 9 419 4235
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 12 December 2000 13:31
To: CF-Talk
Subject: RE: SQL question
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