Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    87

    Unanswered: help with search string

    Hi everybody

    I have this query which need to extract names where I use the wildcard character % before and after the string to indicate that the string should not contain these characters but it is not working right .. Is there any way I could do that..

    SELECT name, famname
    FROM inftable
    WHERE NAME NOT IN ('%socius%', '%rector%', '%superior%')

    In other words my result should not include those names that contains socius, rector, superior, this characters could begin with or in a middle of the field...

    thanks
    Last edited by alexiop; 05-15-08 at 05:11.

  2. #2
    Join Date
    Nov 2003
    Posts
    2,934
    Provided Answers: 12
    Code:
    SELECT name, famname
    FROM inftable 
    WHERE NAME NOT LIKE '%socius%'
    AND NAME NOT LIKE '%rector%'
    AND NAME NOT LIKE '%superior%'

  3. #3
    Join Date
    Aug 2006
    Posts
    87
    thanks resolved it with this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •