Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

constant variable in control file - sqlldr

900441Nov 15 2011 — edited Nov 17 2011
Hi all,
Is there a way to create a dynamic constant variable within the control file?

I'm trying to load from a csv file but need just 2 values from the 1st row, as a constant for the inserts for the rest of the rows.
How/can I use a variable and assign this value to it and use that variable inside the control file?
For example: (first character: 1=header, 2=content)
.csv file:
1,constant1,constant2
2,data11,data12
2,data21,data22
2,data31,data32
2,data41,data42

table:
col1 col2 col3 col4
data11 data12 constant1 constant2
data21 data22 constant1 constant2
data31 data32 constant1 constant2
data41 data42 constant1 constant2


Thank you soo much for your help

Edited by: user9215527 on Nov 15, 2011 8:08 PM

Edited by: user9215527 on Nov 15, 2011 8:11 PM

Edited by: user9215527 on Nov 17, 2011 9:48 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2011
Added on Nov 15 2011
1 comment
1,337 views