You can do it with one control file, but you still need to run sqlldr twice:
Control file:
OPTIONS(skip=1,bindsize=1048576,rows=1024) LOAD DATA APPEND INTO TABLE table_name FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS ( fields )
And then run sqlldr as follows:
sqlldr control=control.ctl data=FIRST.CSV sqlldr control=control.ctl data=SECOND.CSV
Another option that just occurred to me is that you can check the record with the WHEN clause:
OPTIONS(bindsize=1048576,rows=1024) LOAD DATA INFILE 'C:\Documents and Settings\FIRST.CSV' INFILE 'C:\Documents and Settings\SECOND.CSV' APPEND INTO TABLE table_name WHEN (field1 <> 'ContentsOfField1InHeaderRow') FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS ( fields )
If your title always contains fixed text, you can skip it based on the contents of (one of) the fields. Using WHEN can affect performance - depending on the size of the files, you might be better off with two sqlldr calls.
source share