home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!caen!destroyer!fmsrl7!ef2007!fmsrl5!hugh
- From: hugh@slee01.srl.ford.com (Hugh Fader)
- Newsgroups: comp.databases.oracle
- Subject: SQL*Loader foreign key problem
- Date: 16 Dec 1992 20:47:25 GMT
- Organization: Ford Motor Company Research Laboratory
- Lines: 32
- Message-ID: <1go4ktINNarb@fmsrl5.srl.ford.com>
- Reply-To: hugh@slee01.srl.ford.com
- NNTP-Posting-Host: slee06.srl.ford.com
- X-Newsreader: Tin 1.1 PL5
-
- 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@slee01.srl.ford.com
-
-