var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
SQL LOADER and multiple WHEN conditions
I need to load data into a table when a certain column is not '000000' ( a header record) and also when another column not = 'AA' ( a detail record).
Is the following correct? I am unable to find an example like this.
INTO TABLE myschema.TR_TABLE_NAME
WHEN DOC_ID <> '0000000000000000' AND
ITEM_A <> 'SA'
( ITEM_A POSITION(4:5)
, DOC_ID POSITION(60:75) CHAR
all documentation I have read indicates only 'AND' to be used in 'WHEN' clause.
Thanks for your help.
This is an excerpt of a document you can find
Therefore, I'd say your condition might work. Did you try it, anyway? Were the results OK?
A WHEN clause can contain several comparisons, provided each is preceded by AND. Parentheses are optional, but should be used for clarity with multiple comparisons joined by AND, for example:
WHEN (deptno = '10') AND (job = 'SALES')
answer to littlefoot. It worked fine.
When I posted, the system was down. Upon testing, it did work fine. I was uncertain that it would work correctly because no single row contained both conditions, so I thought the undesired results of no rows discarded may have been the results.