Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> LIKE help
hi,
i am wondering what is the best way to do the following.
i need to retrieve data from a table for rows where 2 varchar columns don't contain certain pieces of text, ie
select value1 from test_table
where (text_column1 not like '%CONDITION1%'
and text_column1 not like '%CONDITION2%'
and text_column1 not like '%CONDITION3%')
or
(text_column2 not like '%CONDITION1%'
and text_column2 not like '%CONDITION1%'
and text_column3 not like '%CONDITION1%');
i'm using oracle8.1.7.
i have about 20 different conditions and really would hate to have to have an "and column not like..." clause for each of them.
thanks in advance.
-maurice
samuels_at_seas.upenn.edu Received on Thu Mar 25 2004 - 14:27:30 CST