Link to home
Start Free TrialLog in
Avatar of chandukb
chandukb

asked on

sql loader control file help..........

Hi,

I need help for sql ldr control file -

I need to load data from a file into a table, but need to add a constant to each row -

Here is my control file -

load data
infile '/dev/data_files/MERCH.txt'
truncate
into table tb_load
(DATA_RECORD POSITION(1:621) CHAR)

Above control file works and all data loaded as expected, now, I need to add a constant to each record while loading, so I tried to modify control file as below -

load data
infile '/vend_comp_dev/data_files/DRS_SEASNMERCH_2007031719.txt'
truncate
into table tb_vc_load
(DATA_RECORD CONSTANT '18' || POSITION(1:621) CHAR)

But, above control file gets a syntax error on ||
Can someone help?  How can I add a constant while adding the data file into my table, basically for every record I need constant 18 then data record.

Thanx
cm

ASKER CERTIFIED SOLUTION
Avatar of ishando
ishando
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial