I have an abstruse sqlldr problem that's bothering me. My control file looks something like this:
load data
infile 'txgen.dat'
into table TRANSACTION_NEW
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
( A,
B,
C,
D,
ID "ID_SEQ.NEXTVAL"
)
Data is something like this:
a,b,c,
a,b,,d
a,b,,
a,b,c,d
If I don't put the TRAILING NULLCOLS in, I get the "column not found before end of logical record" error. But although some of the columns are null, the commas are all there, so I don't see a reason for sqlldr to misinterpret the input file, and not get to the end where it generates the ID from the database sequence.
This syntax has worked before with no null columns - why does a null column cause sqlldr to not reach the generated column?
I've got it working, I just want to understand WHY!?!