3 Replies Latest reply on Jun 19, 2006 9:13 AM by Mr Black

    Processing a list with varchar datatype code attached

      A customer created a db with a (Varchar)field that holds a list of number and char example...(123CA65)
      She receives about 200 of these numbers that she has to verify that they exist or not in the database. When I input 2 of the numbers of the list (one that I know is in the DB and one that is not) my output returns no record found..However if I just process the one that is in the database it returns 1 record found. I have tried using IN instead of Like is my query but still not success.....Here is my code

      <cfform action="Claire.cfm" method="Post"><
      <cftextarea name="status" row="38" cols="100" required="yes"></textarea>

      <cfquery name="Tri" datasource="Corport"> Select Code from Dept where code like '%#Status#%'</cfquery>
      <cfset agentlist="#Replace(Status,"#char(13)#","<br>","ALL")#"
      <cfif #Tri.recordcount# GT 0><cfoutput>#agentList#</cfoutput>
      <cfelse>No records found</cfif>