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