4 Replies Latest reply on Aug 9, 2007 7:15 AM by cf_dev2

    Search a string for a specific value

      I've tried a hundred things and have not got this to work. A million thanks to anyone who can help!

      I have a string that consists of numbers such as 3,4,8,9,10

      So I want to setup a select query to pull a value from the database if that value is located inside the string

      FYI -The string is stored in a session variable....in coldfusion of course

      Here is what mine looks like

      <cfquery datasource="blah" >
      SELECT sitenum
      FROM websites
      WHERE #session.rank.keep# LIKE %#webup.sitenum#%

      so the where in data from would be: Where 3,4,5,2,9 LIKE %4% Thanks!