Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

newbie question about SQL Loader

29 views
Skip to first unread message

" src...@hotmail.com

unread,
Feb 17, 2001, 10:54:57 AM2/17/01
to
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

Sybrand Bakker

unread,
Feb 17, 2001, 1:23:56 PM2/17/01
to

<" srcnckpc"@hotmail.com> wrote in message
news:3A8E4C67...@hotmail.com...

Looks like you have the following problem
a) your table definition expects both columns to be not null/mandatory
b) there are several blank lines in the file test.txt

However, without looking at the exact table definition and (part of)
test.txt
your problem is difficult to resolve.
Note: as per your definition you expect test.txt to have a fixed record
length. If that isn't true you can expect all kind of mysterious problems,
because Sql*loader will simply apply the masks in the control file.

Hth,

Sybrand Bakker, Oracle DBA


Ispirer

unread,
Feb 19, 2001, 10:36:11 AM2/19/01
to
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"@hotmail.com> wrote in message
news:3A8E4C67...@hotmail.com...

0 new messages