| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> SQL*Loader foreign key problem
I am having a problem with SQL*Loader and foreign keys. I have two tables:
CREATE TABLE components(
id NUMBER(4,0) NOT NULL, confignum NUMBER(3,0) NOT NULL[other stuff deleted]
CREATE TABLE conventional_data(
id NUMBER(4,0) NOT NULL, comp_id NUMBER(4,0) NOT NULL,[other stuff deleted]
The conventional_data.comp_id column is a foreign key which references components.id.
Here is my problem: I am trying to load data into the conventional_data table using SQL*Loader. Each row in the external file contains a confignum value which is assumed to pre-exist in the components table. How can I assign a value to conventional_data.comp_id that points to the appropriate row in the components table? It seems as though I would have to use a SQL select in order to do this. Have I hit the limit as to what SQL*Loader can do?
-- Hugh Fader Ford Research Laboratory hugh_at_slee01.srl.ford.comReceived on Wed Dec 16 1992 - 14:47:25 CST
![]() |
![]() |