Forum Stats

  • 3,760,452 Users
  • 2,251,709 Discussions
  • 7,871,130 Comments

Discussions

sqlldr special requirement

Hi all,

i've tryed to google but wasn't able to find something useful;

I need to do particulary thinks with sqlldr and I don t not if that is possible, in particular:

I had a field in the file that is not present in the table, and I need that field to determine some business logic; the file is, has two line:

0032PF12345622020577

0032PK12345622020576


and I have this table:

CREATE TABLE CESSIONI

  ( cod_1 VARCHAR2(4 BYTE) NOT NULL ENABLE, 

  cod_2 varchar2(8 BYTE)

  )


and the ctl file:

LOAD DATA

replace

INTO TABLE CESSIONI

TRAILING NULLCOLS

(

  cod_1    POSITION(0:3),

cod_2    POSITION(5:6),

)


what i need is storing the value 0032 in the cod_1

Storing the value PF in a variabile (type)

Storing the value 12345622 in the cod_2

Storing the value 020577 (is a date) in a variabile t_nascita

And when the value in the variabile type is PF update a different table whit the value of t_nascita?

Is that possibile?

Tagged: