sqlldr & sequence [message #73154] |
Thu, 19 February 2004 04:07 |
jim
Messages: 74 Registered: July 2000
|
Member |
|
|
In my control file I'm loading two tables.
In the first table I set a t1.field to a sequence (field "seq.nextval")
In the second table I want to set a t2.field to the current value of the sequence used in t1 (field "seq.currval")
All records(10) in table 1 have field set to a distinct value(1,2,3,4...10)
All records in table 2 are set to the same value(10,10,10....10) where I wanted it to be just like table 1
How could I get this to work?
Thanks in advance for any and all of your help,
Jim
|
|
|
Re: sqlldr & sequence [message #73155 is a reply to message #73154] |
Thu, 19 February 2004 04:16 |
jim
Messages: 74 Registered: July 2000
|
Member |
|
|
My ctl file:
LOAD DATA
INFILE 'small.txt'
INTO TABLE T1 TRUNCATE
FIELDS TERMINATED BY "|"
TRAILING NULLCOLS
(
TODAY,
TODAY_ID "SEQ.NEXTVAL"
)
INTO TABLE T2 TRUNCATE
FIELDS TERMINATED BY "|"
TRAILING NULLCOLS
(
TODAY FILLER POSITION(1),
TOMORROW,
TOMORROW_ID "SEQ.CURRVAL"
)
|
|
|