Re: SQLLDR Import of Flat files. How to handle Null fields properly

From: Tony <ar_at_hotmail.com>
Date: Tue, 21 May 2002 11:17:49 +0100
Message-ID: <1021976227.9706.0.nnrp-14.d4f0f429_at_news.demon.co.uk>


Hi I tried to run this and came up with a few problems.

The values of the very first field are numbered 1 to 3021 but when the data loaded I got very strange results. IE the very first value stored was 857877553 then the next record was stored as 290" instead of 3290. I think that the sqlldr is not translating the line FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' properly.

I think I need to work on this again

regards

Tony

"Bricklen Anderson" <bricklen_at_shaw.ca> wrote in message news:3CE92DC6.562D1B73_at_shaw.ca...
> rewrite like this:
>
> LOAD DATA
> INFILE site_list3.txt
> into TABLE TABLE_IMP_TEST
> TRAILING NULLCOLS # this is what you are missing
> FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
> (OBJID INTEGER,
> ORACLE_REF CHAR NULLIF ORACLE_REF = BLANKS,
> ACCOUNT_NAME CHAR NULLIF ACCOUNT_NAME=BLANKS,
> ORG_ID CHAR NULLIF ORG_ID=BLANKS,
> SITE_ID INTEGER NULLIF SITE_ID=BLANKS,
> SITE_NAME CHAR NULLIF SITE_NAME=BLANKS,
> SHIP_REF CHAR NULLIF SHIP_REF=BLANKS,
> BILL_REF CHAR)
>
> <snipped>
> >
> > Record 11: Rejected - Error on table TABLE_IMP_TEST, column BILL_REF.
> > Column not found before end of logical record (use TRAILING NULLCOLS)
> ^^^^^^^^^^^^^^^^^^^^^
>
> You are given the answer right there...
>
>
> Cheers,
>
> Bricklen
Received on Tue May 21 2002 - 12:17:49 CEST

Original text of this message