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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Loader -Field in data file exceeds max length

Status
Not open for further replies.

rk68

Programmer
Jul 15, 2003
171
IN
Hi,
I have a CSV file with around 475 characters. The field in the table PO_NARRATION is varchar2(200).
I want only the 1st 200 characters to be inserted in the table.
While trying to insert the data thru SQL Loader, I get the following error:

>>> Record 1: Rejected - Error on table T_TMP_INVOICE_UPLOAD, column PO_NARRATION.
>>> Field in data file exceeds maximum length

The CTL file given below. What can be the issue?
---------------------------
options (skip=1,errors = 1000,rows = 50000)
Load data

INFILE 'narration_issue.csv'
BADFILE 'narr.bad'
DISCARDFILE 'narr.rej'
DISCARDMAX 1000

append
into table t_tmp_invoice_upload
fields terminated by "," optionally enclosed by '"'
trailing nullcols
(PO_NARRATION "SUBSTR(Ltrim(Rtrim:)PO_NARRATION)),1,200)"
)
---------------------------

TIA,
Raj
 

Could manage it by using the below script.

(PO_NARRATION char(2000) "SUBSTR(Ltrim(Rtrim:)PO_NARRATION)),1,200)")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top