SQL * Loader Error [message #368270] |
Tue, 24 October 2000 13:54  |
Thaniks
Messages: 8 Registered: October 2000
|
Junior Member |
|
|
Hi ,
I am trying to populate data into a table temprt with the following script using SQL * Loader utility and I get the error
'Record 1: Rejected - Error on table TEMPRT.
ORA-01401: inserted value too large for column".
I have a sequence temprt_s too.
If I try to populate the data without sequence number and sysdate for the columns icustomer_id and rcvd_dt respectively, it populates successfully.
Please help me in this regard.
Thanks.
Thaniks.
load data
infile '/export/home/oracle/temprt.dat'
badfile '/export/home/oracle/temprt.bad'
discardfile '/export/home/oracle/temprt.dsc'
discardmax 0
append
into table temprt
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(icustomer_id "temprt_s.nextval" ,
rcvd_dt "to_char(sysdate, 'DD-MON-YY')" ,
sap_cust_id ,
customer_type ,
name ,
ship_to_address ,
bill_to_address ,
contact ,
phone ,
fax ,
loaded_flag ,
email
)
|
|
|
Re: SQL * Loader Error [message #368275 is a reply to message #368270] |
Wed, 25 October 2000 02:31   |
Kieron
Messages: 6 Registered: October 2000
|
Junior Member |
|
|
Hi Thaniks,
Try your ctl file like this:
load data
infile '/export/home/oracle/temprt.dat'
badfile '/export/home/oracle/temprt.bad'
discardfile '/export/home/oracle/temprt.dsc'
discardmax 0
append
into table temprt
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(icustomer_id "temprt_s.nextval" ,
rcvd_dt "to_char(sysdate, 'DD-MON-YY')" ,
sap_cust_id position(1),
customer_type ,
name ,
ship_to_address ,
bill_to_address ,
contact ,
phone ,
fax ,
loaded_flag ,
email
)
The position (1), forces the loader to only concern itself with the datafile from position one forwards. Else, everything will be shifted two places down and thus the loader error with size problems.
Let me know if it does not work.
Cheers,
Kieron
|
|
|
|