SQL Loader Master/Detail

From: Jim <cramerj_at_earthlink.net>
Date: 8 Jun 1998 22:48:29 GMT
Message-ID: <01bd9330$0bc64b60$88a42399_at_cramerj.earthlink.net>



[Quoted] I asked this question before and have found a few answers. Thanks for all your help!

I have a file which looks something like this

HEADER LINE
HEADER LINE
HEADER LINE MASTER LINE 1
MASTER LINE 2
MASTER LINE 3
MASTER LINE 4 (always 4 lines for the Master)

Detail lines 1 to possibly 15

I can populate the Master table with the first row and the Detail with all of the rows.
The Master/Detail relationship is set up using 2 sequences defined in the database. For the Master Table set the Master_ID_Sequence to NEXTVAL during the load.

For the Detail table, use NEXTVAL for the Detail_ID_sequence and use CURRVAL for
the Master_ID_FK fieldduring the load. Set the commit option for ROWS to 1.  This will give the Master/detail relationship between the tables.

The only thing I can't figure out is how to load 4 rows into the Master table
and only 1 in the Detail. I tried CONCATENATE 4, but that takes every 4 lines
together as one. I also tried CONTINUEIF.

BTW: Does anybody think that SQL*Loader is really WEAK as an Oracle product?

THANKS! Received on Tue Jun 09 1998 - 00:48:29 CEST

Original text of this message