I am trying to load master/detail type records with sqlldr. I am using when clauses to decipher which table to load into. The setup looks like
So some of the details must go into different tables. I use a sequence (sequence.nextval) to get an identifier on the Master record. Then I attempt to use sequence.currval to provide a relationship between the details and the master. However, when I run this, the sequence.currval only inserts into the first 1 or 2 details, and then it says that the sequence has been closed. I get ORA 08002, saying the nextval must be called first. However, I don't understand because I have called the nextval, and it successfully uses it in the currval for the first 2 details, but then it just stops...I think the sequence is closing or something like that...