SQLLDR add header to the bad file

44 Views Asked by At

Team, how can we add header to the .bad file being created by SQLLDR. I have header in the input file and the same header we would like to add it to .bad file. Tried skip=1 on the command line but it's not writing into bad file.

Note: Only when bad file is being created we want the header to be added.

1

There are 1 best solutions below

1
Connor McDonald On

Can you just do some post-processing? You didn't specify platform, but in terms of some pseudo code:

run sqlldr
if file-exists "myfile.bad" then
  head -1 inputfile >  newfile.bad
  cat myfile.bad >> newfile.bad

or similar