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!!