niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle » Tools
Help!!!
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Vladimir M. Zakharychev
*nix forums Guru Wannabe


Joined: 22 Mar 2006
Posts: 144

PostPosted: Thu May 11, 2006 10:18 am    Post subject: Re: Help!!! Reply with quote

"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
Back to top
Wallace
*nix forums beginner


Joined: 19 Apr 2005
Posts: 20

PostPosted: Thu May 11, 2006 10:06 am    Post subject: Help!!! Reply with quote

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..
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Wed Jan 07, 2009 7:03 pm | All times are GMT
navigation Forum index » Databases » Oracle » Tools
Jump to:  


SMS-Sprüche | Loans | Car Loan | Low Interest Credit Card | Secured Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2116s ][ Queries: 15 (0.1446s) ][ GZIP on - Debug on ]