Hi,
I am stuck up with the below mentioned error since from copule of days any help in this regard is really great.
I am trying to load data to oracle database using Oracle sql loader.
I have to load data to two different tables using one control file, for first table all the datas are null and in the control file itself I am providing these data and primary key for this first table is loaded by calling a sequence. For this no problem, real problem starts when I am trying to load data to the second table by giving a csv file.
For second table for the first column itself it is not loading data from csv file because it is giving error as data size is more then max size in table. I have double checked the data size is less then the declared size also I am trimming the data in the control file.
More over when I am trying to load data for only second table using a control file by giving the same csv file it is working fine and successfully loading the data to the respective table.
Sample code of my control file :
OPTIONS(SKIP=1)
LOAD DATA
APPEND
INTO TABLE BATCH
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(
BATCH_ID "BATCH_ID_SEQ.nextval",
BATCH_DATE "null",
BATCH_TYPE ,
------
------
-------
)
INTO TABLE REPO
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(
REPO_ID "LI_MARGIN.CITI_REPO_ID_SEQ.nextval",
BATCH_ID "LI_MARGIN.MARGIN_BATCH_ID_SEQ.currval"
CLIENT "TRIM(:CLIENT_MNEMONIC)",
ACCOUNT_NO "TO_NUMBER(:ACCOUNT_NO)",
TRANS_TYPE "TRIM(:TRANS_TYPE)",
------
------
-------
)
For table repo I am providing the csv file from cmd
My SQL Loader command : CONTROL=C:\Repo.ctl DATA=C:\repo.csv log=C:\log.txt userid=***/*****
Erro I am getting : For Repo table for CLIENT column it saying the actual value is more then the max size available.
Note : For CLIENT field the size in table is 8char where as data in csv is 7char , also I am trimming.
Thanks in Advance,
Shashanka