I have a Linux script that will run SQL*Loader daily to load a file. Each record loaded from that file must be assigned a batch ID, which is determined from a sequence. The batch ID is constant for each load, so that all of day 1's records are batch 1, day 2's are batch 2, etc.
Once I select the batch ID from the sequence, is there a way to pass that value to SQL*Loader at the command line in order to use it to load the records? I know I can dynamically rebuild the control file each time and use a constant, but I'm just wondering whether there is a more straightforward method.
This may be a misinterpretation, or you may have simplified your situation for the sake of the forum, but could you just have a column in the load table to give a datestamp for the load, and if you need to assign a batch number to that set then have another (parent) table to translate the datestamp into a number?