The first thing I would do is rework the database structure. Using the like
'%blah%' will get you results but is horrendously slow.

You should have a join/junction/your preferred term table that does this for
you.

Adam
  -----Original Message-----
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: 05 March 2004 09:48
  To: CF-Talk
  Subject: Querying a comma delimited field

  I have a field ("name") with a number of comma delimited values in it,
say,
  "Bob,Carol,Ted,Alice". How can I query to find all the records that
include
  the word "Ted"?

  <CFQUERY NAME="foo" DATASOURCE="bar">
  SELECT Address
  FROM personal
  WHERE name ???? "Ted"
  </cfquery>

  Thanks in advance for your help,
  Les
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to