Hi Michael,

Thanks for the response.  Please excuse me if this is obvious as I don't see it.  How would I extract on the numbers I need using the below.  If I have 20 area codes would I need to make the first in (then the 20 area codes) then OR for each areacode ?

Thanks

Mike
  ----- Original Message -----
  From: Michael Traher
  To: CF-Talk
  Sent: Friday, November 21, 2003 12:44 PM
  Subject: RE: SQL Help

  (Left(phone_list,3) in ('212','213')  OR phone_list like '%,212%' OR
  phone_list like '%,213%')

  but I would predict poor performance.

  No chance to change the database I guess?

  Michael Traher

  -----Original Message-----
  From: Mickael [mailto:[EMAIL PROTECTED]
  Sent: 21 November 2003 17:23
  To: CF-Talk
  Subject: SQL Help

  Hello All,

  I have a memo field in SYBASE that contains phone numbers delimited by a
  comma.

  I need to qualify telephone numbers that are in a group of area codes,
  using SQL only I can't use CF.

  The is called phone_list and the values look like this
  "2125551212,213555-1212,2145551212"

  How could I in SQL only grab telephone # with area codes that are in my
  list.

  I was thinking to do where Left(phone,3) in (212,213)

  But how to a parse through the memo field.

  Thanks

  Mike

    _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to