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!

SQLLOAD sql loader data management using sequences

VinodOct 2 2016 — edited Oct 5 2016

Hi experts,

What we have is a fairly simple requirement in my view, any pointers would be greatly appreciated.

We have x (let's say 20) records per file, when we load the data, we would like to load a couple of additional columns both sequence generated, these are file_id and record_id.

file_id should be constant for a given file but record_id will be a next value of sequence per record.

We don't have any issues with record_id as we can call a sequence from the sqlload control file for each record but file_id is the tricky bit. We would like to do sequence.nextval once and then do sequence.currval.

I tried WHEN RECNUM etc. but sqlload doesn't seem to like it, are there any ways I can do this? something like a variable that stores the sequence value for file_id? Any thoughts??

Many thanks

Vinod

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2016
Added on Oct 2 2016
7 comments
2,982 views