Hi,
Is there way to do the following sql statement?
---------------------------------------------------
select field1, field2, field3
from table
where field3 not like ('text1', 'text2', 'text3')
---------------------------------------------------
select field1, field2, field3
from table
where field3 not in ('text1', 'text2', 'text3')
----------------------------------------------
That statement would give me inaccurate results. Text1...., these are company names and I need to use NOT LIKE statement to minimize the margin or error.
That statement would give me inaccurate results. Text1...., these are company names and I need to use NOT LIKE statement to minimize the margin or error.
how cum you get inaccurate results?
since ur company names are 'text1', 'text2' and 'text3'. You can bring all these straight('text1', 'text2' and 'text3') into a NOT IN clause.
LIKE statement will be useful when you want to retrieve records which contain values %TEST%...
select field1, field2, field3
from table
where field3 not like 'text1'
or field3 not like 'text2'
or field3 not like 'text3'
------------------------------------
That is what I am doing right now, but what happens if I have 20-30 text strings? Do I have to write "field3 not like 'text#'" for each one?
Bookmarks