You'd have to break it up for each value of table_field:
where 
<cfset first=0>
<CFLOOP INDEX="index_name"    LIST="table_field"
DELIMITERS="item_delimiter">
        <cfif first gt 0> or </cfif>
        #index_name# in ('url.variable') 
        <cfset first=1>
</CFLOOP>


-----Original Message-----
From: Harold Brauer [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 06:18
To: CF-Talk
Subject: SQL Problem


I am building a dynamic query, if a certain form field is selected it adds
the following statement to the end of the where clause: and table_field in
('url.variable')

The table field houses a comma delimited list of numbers and the url
variable is a comma delimited list as well.

The query will only return a record when both lists (the table field and the
url variable) match; I want it to pull a record when the table field
contains any part of the URL variable.

Any help would be greatly appreciated.

Sincerely,

DDINC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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