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

SQLLDR: How to Truncate fields in input file during loading?

1,554 views
Skip to first unread message

Saqib Ali

unread,
Oct 2, 2002, 6:21:01 PM10/2/02
to
Hi, My Sqlldr control file looks something like this:


LOAD DATA
INFILE 'myDataFile.txt'
TRUNCATE INTO TABLE myTable
FIELDS TERMINATED BY '~'
trailing nullcols
(
ID sequence (count,1),
myField1 position (1) char(40),
myField2 position (*) char(50),
myField3 position (*) char(40)
)


However, some records in myDataFile.txt get rejected because their
fields exceed that which I have specified in the above control file.

What do I need to put into my Control file to make sure that any such
longer-than-allowed fields are automatically truncated then loaded?


Thanks
Saqib

Richard Kuhler

unread,
Oct 2, 2002, 7:33:21 PM10/2/02
to
...
myField1 position (1) char(40) "SUBSTR(:myField1, 1, 40)",
...

Richard

0 new messages