Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> LIKE help

LIKE help

From: <samuels_at_blue.seas.upenn.edu>
Date: Thu, 25 Mar 2004 20:27:30 +0000 (UTC)
Message-ID: <c3vfbi$91e9$1@netnews.upenn.edu>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US