SQL Loader and sequences.
Date: 1997/12/23
Message-ID: <882902447.1644298241_at_dejanews.com>#1/1
I am trying to import data into 3 tables. I can load it, but I am having trouble linking the data together across the 3 tables. I've tried table insert triggers and the SEQUENCE function with sql loader unsuccessfully.
The data is in one file. It has a static format (ie: use position() to define columns). The logical records are arranged as follows: Record 1 (Summary Data); Record 2 (Related sales data) There can be 0 or more of type Record 2; Record 3 (Related purchases) There can be 0 or more of type Record 3; Each record type has a type_id column.
I want to load in the following manner:
[PSEUDO CODE ON]
INSERT INTO TABLE1
WHEN TYPE_ID = 1
(ID ID_SEQ.NEXTVAL,
etc...)
INSERT INTO TABLE2
WHEN TYPE_ID = 2
(ID ID_SEQ.CURRVAL
etc...)
INSERT INTO TABLE3
WHEN TYPE_ID = 3
(ID ID_SEQ.CURRVAL
etc...)
[PSEUDO CODE OFF]
Does anyone have any suggestions?
-Shannon
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Tue Dec 23 1997 - 00:00:00 CET