Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SqlLoader maximum-length-exceeded error

Status
Not open for further replies.

DoraC

Programmer
May 7, 2002
98
US
Hi,

I'm using SqlLoader to load data into our Oracle 9i database, and am having problems with
Code:
Field in data file exceeds maximum length
errors. I know what field is causing this, so I applied a substring as so:
Code:
Field char "ltrim(rtrim(substr( :Field, 1, 10 )))",
but the problem persists. The field is defined as data_length = 2000 in our database.

Thanks - any help *very* appreciated...
Dora
 
Hi, examine the source file to see if that field actually is enclosed by whatever delimiter you are using..

[profile]

 
The problem resides in SQL*Loader's character buffer, which if I remember correctly is 256 char.
What you have to do is:

Field char(2000) "ltrim(rtrim(substr( :Field, 1, 10 )))",



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thank you LKBrownDba, that completely solved my problem!!!

dora
 
why not just increase the size of your char definition in the sqlldr file? You can do this even for clobs or longs. ie. if length of field >4000, you can still specify a larger size in the sqlldr control file
char (60000) works just fine. You'll just have to modify your field type from varchar2(4000) to clob.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top