Re: newbie question about SQL Loader

From: Ispirer <ispirer_at_ispirer.com>
Date: Mon, 19 Feb 2001 17:36:11 +0200
Message-ID: <96rehd$m6c9e$1_at_ID-75577.news.dfncis.de>


To load blanks as empty strings into CHAR NOT NULL columns use for fixed length format DECODE function or use CSV format.

load data
infile 'test.txt'
into table excel
( Cusip position(01:17) char "decode(:Cusip, NULL,' ' ,:Cusip)",
  Issuer_name position(18:28) char "decode(:Issuer_name, NULL,' ' ,:Issuer_name)")

Dmitry

--
www.ispirer.com - Database migration tools and services for Oracle and IBM
DB2.


<" srcnckpc"_at_hotmail.com> wrote in message
news:3A8E4C67.BED9DE51_at_hotmail.com...

> Hello:
>
> Here's my control file:
>
> load data
> infile 'test.txt'
> into table excel
> ( Cusip position(01:17) char,
> Issuer_name position(18:28) char )
>
> I get the following errors:
>
> Record 11: Discarded - all columns null.
> Record 12: Discarded - all columns null.
> Record 13: Discarded - all columns null.
> Record 1: Rejected - Error on table EXCEL.
> ORA-01400: cannot insert NULL into ("SCOTT"."EXCEL"."ISSUE_DATE")
>
> Record 4: Rejected - Error on table EXCEL, column CUSIP.
> Column not found before end of logical record (use TRAILING NULLCOLS).
>
> If I do 'not null' then I get errors saying 'syntax error....not
> null....."
>
> Is the format 'test.txt' wrong? What other format can I use
>
> Thanks so much,
> SRC
>
Received on Mon Feb 19 2001 - 16:36:11 CET

Original text of this message