Paul,
I am not sure if you want to get the subset to match in the DB or in the CF
variable???
You could always loop over the WHERE items.
SELECT
*
FROM
[table]
WHERE
1 = 0
<cfloop index="i" list="#FORM.search#">
OR
CAST( ClientID AS VARCHAR(12)) LIKE '%i%'
</cfloop>
The above will match PART of the search form in the FULL id in the database.
I guess you might be able to go the other way as well:
SELECT
*
FROM
[table]
WHERE
1 = 0
<cfloop index="i" list="#FORM.search#">
OR
'i' LIKE '%' + CAST( ClientID AS VARCHAR(12)) + '%'
</cfloop>
This will match part of the database ID in the search form...
I have NOT tested this... But maybe It can give you some ideas.
.......................
Ben Nadel
www.bennadel.com
-----Original Message-----
From: Paul Ihrig [mailto:[EMAIL PROTECTED]
Sent: Monday, August 21, 2006 4:34 PM
To: CF-Talk
Subject: cfquery: search numeric IN/Contains/Like
i cant get the IN/CONTAINS to work on searching a numeric field.
i can can get the result if the passed value is the exact Number.
but if i want the subset of a number or any results with 1300 then i cant
get it to work.
i have googled it, every way i can think
<cfquery name="ClientList_Query" dbtype="query"> SELECT * FROM
ClientList_Query1 WHERE 0 = 0
<!--- Search by ClientID --->
<cfif FORM.search IS NOT "">
AND ClientID IN (#FORM.search#)
</cfif>
ORDER BY #DefOrder# #URL.OrderByType#
</cfquery>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250509
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4