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

Home -> Community -> Usenet -> c.d.o.tools -> sql loader and "OR" in when clause - cross post

sql loader and "OR" in when clause - cross post

From: Pat <patp_at_cpinternet.com>
Date: 2000/06/08
Message-ID: <jrL%4.438$wb7.1554@newsfeed.slurp.net>#1/1

Hello,

I'm loading a flat file into a DB using SQL*Loader. I need to load only rows in which one column is <> to (for example) 'ABC' AND another column is
<> to 'X' OR 'Y'. The rest of the records go to another table - the bulk
will go to the first table.

First I tried to get it to load with only WHEN (col_1 <> 'ABC) AND (col_b
<> 'X') ...forget the OR for now. None loaded, error message said the when
clause wasn't met, though there **were** columns where both conditions were true. If I said WHEN(col_1 <> 'ABC') AND (col_b = 'X'), I would get those columns. It seems if I write WHEN col_b <> 'X', I should get the rest. I did finally (though not thoroughly tested) get loading accomplished with using the postion of the data in the flat file record, ie WHEN (col_1 <> 'ABC') AND (32:32) <> 'X'. I got that type of syntax off a web faq. And I found a paragraph stating the when clause can have multiple conditions, and must be connected with ANDs. Never found a word about ORs. I tried all sorts of syntax, NOT, NOT IN, etc...but to no avail.

Can this be done? Must be a way!!

Thanks in advance for any help, it's greatly appreciated!!!

Pat Received on Thu Jun 08 2000 - 00:00:00 CDT

Original text of this message

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