Ok first of all you don't need hashes when doing <cfif rReferAgencyNo neq "">
Secondly, you need to split the string, if the string rRefereAgencyNo contains 1994-5668-273749-2 it will only ever find one record using Like '%#rReferAgencyNo#' Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 -----Original Message----- From: Paul Ihrig [mailto:[EMAIL PROTECTED] Sent: Thursday, 21 September 2006 7:45 AM To: CF-Talk Subject: cf [-] search varchar i am having a bit of a problem with this i have this search i am working on every thing works fine, except the column that stores numbers like 1994-5668-273749-2 it is a varchar field in the db in my query i can do this <CFIF #fReferAgencyNo# neq "">AND ReferAgencyNo = '#fReferAgencyNo#'</cfif> to get an exact match of the field: 1994-5668-273749-2 but not: <CFIF #fReferAgencyNo# neq "">AND ReferAgencyNo LIKE '%#fReferAgencyNo#%'</cfif> to get allresults for 1994- OR -56 i thought varchar is not a number.. so like % wild card should work? do I need some thing to account for the dash?? [-] this on a QoQ of a stored proc. any ideas? i want to find a like or a in. OR an exact match. thanks next i will want to the same thing on a number ID field.. but will get to that after this.. maybe its the same thing -paul ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:253690 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

