Re: SQL Loader - Detecting blank fields using WHEN

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 08 Jun 2004 22:11:20 -0700
Message-ID: <1086757894.142997_at_yasure>


stevie wrote:

> 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
> 04A01,11
> 76301,13
> 76301,13,A
> 76301,13
> 79601,13
> 79601,14,034
> 79601,13,174
> 79601,13,314

What third column ... I only see a single comma Fields terminated by comma ... take a look at your data

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Wed Jun 09 2004 - 07:11:20 CEST

Original text of this message