RE: need help on load flat file to IUS
Posted in 1998
----------
From: jiang@pema.scs.unr.edu[SMTP:jiang@pema.scs.unr.edu]
Sent: Thursday, April 09, 1998 5:37 PM
I dumped the files from Illustra table and then wana load those files to
IUS table in the same structure. I wrote a shell script to do that. The
key command is
echo "LOAD FROM $WEBPAGE_DIR/$FILENAME DELIMITER '|' INSERT INTO $TABLE;" |
dbaccess $DB
It gave me the following error:
691: Missing key in referenced table for referential constraint
(informix.r123_138).
111: ISAM error: no record found.
847: Error in load file line 1.
Error in line 1Near character position 91
JL: Well, it means there is a foreign key on the table you are loading, and
one of the rows of data has a foreign key value which is not defined in the
table with the corresponding primary key. There are several
possibilities:
1. The referenced table could be $TABLE, the table being loaded. Add a SET
CONSTRAINT"informix".r123_138 DEFERRED command (check syntax!) to your
script.
2. The referenced table is different, in which case you need to fully load
the referenced table before loading $TABLE.
3. The referential constraint isn't wanted and should be dropped.
4. The data being loaded isn't fully correct...
No doubt there are other possibilities too. I'd rate 2 as the most
likely.
Yours,
Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h>