SQL Loader - Detecting blank fields using WHEN
From: stevie <steviehaston_at_hotmail.com>
Date: 8 Jun 2004 02:32:58 -0700
Message-ID: <4092f6be.0406080132.54ca062c_at_posting.google.com>
[Quoted] [Quoted] I'm trying to load a simple table using SQLLDR under oracle 8.1.7.4 which only loads records that have a specific blank field. I'm using the WHEN clause to detect these records but they are ignored since all records fail with "Discarded - failed all WHEN clauses".
Date: 8 Jun 2004 02:32:58 -0700
Message-ID: <4092f6be.0406080132.54ca062c_at_posting.google.com>
[Quoted] [Quoted] I'm trying to load a simple table using SQLLDR under oracle 8.1.7.4 which only loads records that have a specific blank field. I'm using the WHEN clause to detect these records but they are ignored since all records fail with "Discarded - failed all WHEN clauses".
The command is sqlldr userid=abc/xyz control=ldrtest.ctl
The control file is as follows:
LOAD DATA
INFILE *
REPLACE
INTO TABLE ldrtest
WHEN FIELD3 = ''
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
FIELD1,
FIELD2,
FIELD3
)
BEGINDATA
[Quoted] 04A01,11 76301,13 76301,13,A 76301,13 79601,13 79601,14,034 79601,13,174 79601,13,314Received on Tue Jun 08 2004 - 11:32:58 CEST