Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Loader questions
I am trying to populate two tables in a Master/Detail relationship using a flat file. The file is approximately 200 rows with each row 80 columns, The Master data looks like this in the file:
PCD ,19980503,6,01 POCONO DOWNS RACE DATE: 05/03/1998 RACE: 01 TYPE: LATE BETTING CLASS: 6000CL GAIT:PACE
APPEND
INTO TABLE RACE
when (6) = ','
and use other qualifiers for the next rows, however I am stumped at finding a way to define the columns for different rows of data, so that I can populate the table from the values in multiple rows.
Also, I would like to add fields from the Master table to the Detail table, so I can set up a foreign key.
I am trying the statement:
race_num_fk "NVL(:race_num_fk,':race.race_num')"
but this does not work. I need the foreign key to set up the Master/Detail relationship between the two tables. I would prefer not to use a Trigger on the database because I would have to enable and disable it depending on how the table is updated (Form, Loader, etc.).
Thanks for all of your help!
Jim Received on Wed May 13 1998 - 00:00:00 CDT