Vladimir M. Zakharychev *nix forums Guru Wannabe
Joined: 22 Mar 2006
Posts: 144
|
Posted: Thu May 11, 2006 10:18 am Post subject:
Re: Help!!!
|
|
|
"Wallace" <princevictor.moses@gmail.com> wrote in message
news:1147342003.621500.248390@q12g2000cwa.googlegroups.com...
| Quote: |
but it is telling
" ORA-02291: integrity constraint (PRINCE.UD_COSA_FORMAL_FK2)
violated - parent key not found
ORA-06512: at "PRINCE.PROC_COSA", line 9
ORA-06512: at line 2 "
UD_COSA_FORMAL_ID is the primary key...
What is the problem?
The error message described you the problem in detail, |
didn't it? You have a foreign key constraint and your insert
inserts data for which no parent key exists. You need first
populate the master table which UD_COSA_FORMAL_FK2
references and then insert detail data.
--
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com |
|
Wallace *nix forums beginner
Joined: 19 Apr 2005
Posts: 20
|
Posted: Thu May 11, 2006 10:06 am Post subject:
Help!!!
|
|
|
Hai...
I am able to get a collection of rows using BULK COLLECT INTO.
When i try to insert this collection into another table as follows
" "INSERT INTO XPRS$UD_COSA_FORMAL_T(UD_COSA_FORMAL_ID,
COSA_FORMAL, KORT_BETEGNELSE, BETEGNELSE, STARTDATO, SLUTDATO,
UGYLDIG_JN, UDTREK_ID, OPDAT_BRUGER, OPDAT_DATO,
XPRS$UD_COSA_FORMAL_T.VERSION) VALUES(collections(i).COSA_FORMAL_ID,
collections(i).COSA_FORMAL, collections(i).KORT_BETEGNELSE,
collections(i).BETEGNELSE, collections(i).STARTDATO,
collections(i).SLUTDATO, 'N', 0, collections(i).OPDAT_BRUGER,
collections(i).OPDAT_DATO, 0); "
but it is telling
" ORA-02291: integrity constraint (PRINCE.UD_COSA_FORMAL_FK2)
violated - parent key not found
ORA-06512: at "PRINCE.PROC_COSA", line 9
ORA-06512: at line 2 "
UD_COSA_FORMAL_ID is the primary key...
What is the problem?
Thanx in advance...
Looking forward for the response.. |
|