Hi Again,

Thanks for your help yesterday. New problem:

2 tables - first is master, second is detail and they have a foreign key on the id something like:

table1:
personID
name

table2:
addressID
personID
address

if the record to load is as follows
name address
john america
doe england

and the control file is:

INTO TABLE TABLE1
FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
personID "person_s.nextval"
name
)

INTO TABLE TABLE2
FIELDS TERMINATED BY WHITESPACE OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
addressID "address_s.nextval"
personID "person_s.currval"
address
)


Except....
when i load more than one record, all the foreign keys (personID) in the Table2 will be the same and equal the foreign key of the LAST person loaded like this:

personID name
1 john
2 doe

addressID personId address
1 2 america (****WRONG****)
2 2 england


any help would be great

thanks