Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Unanswered: NOT CONTAINS command

    I am trying to use the NOT CONTAINS command in SQL to select for
    rows that do not contain certain phrases. However, about 95-99% of the rows will actually not contain those phrases, but every now and then, there is a row that contains one or more of the phrases. Anyone have an idea why this might be so. Here is an example of the query that I am using:


    select _____ from ______ where
    NOT CONTAINS (_____, ' "prior study" or "no prior" or "comparison"
    or "yesterday") > 0;

    The majority of the resulting rows do not contain any of those words or phrases, but a few do. I am trying to figure out why that is. I even tried changing the syntax to:

    select _____ from ______ where
    NOT CONTAINS(_____, ' "prior study" ' ) > 0
    and NOT CONTAINS ( _____, ' " no prior" ' ) > 0

    etc..... where I keep using the NOT CONTAINS in replace of OR. However, I get the same results.

    Anyone have any ideas why this might be the case? Any help would be greatly appreciated!!

  2. #2
    Join Date
    Oct 2003
    Location
    Switzerland
    Posts
    140
    What database are you using ?

Posting Permissions

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