0

For example, my input file looks like this

1;2;AAA;

and my database like this:

PK NUMBER,
C1 NUMBER,
C2 NUMBER,
C3 VARCHAR2

On my PK I have a sequence but I cannot use it in the .ctl file.

I am trying to use a ctl file like this: (separated by ";")

PK FILLER "function()", C1, C2, C3

Yet this fails, it jumps over the first value in the input file...so

3
  • have u tried sequence function: SEQUENCE(MAX,1) Commented Feb 1, 2012 at 18:08
  • 2
    @radshk RADU - Can you post your complete SQL*Loader control file? Commented Feb 1, 2012 at 18:12
  • @Justin LOAD DATA INFILE 'AlimentationFichier.data' BADFILE 'AlimentationFichierRejets.data' REPLACE INTO TABLE P4PCA2_PIVOT_CA FIELDS TERMINATED BY "||" ( NUM_IDGEN_ALL_EVT FILLER "fff()", CA_DAT_EVT "to_date(:CA_DAT_EVT,'YYYY-MM-DD')", CA_NUM_PSG_EVT , and on.. Commented Feb 2, 2012 at 8:52

1 Answer 1

1

The solution was to add TRAILING NULLCOLS to the loader and place the PK at the END so it considers it null and uses the sequence, and therefore not mix the fields order.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.