Click here to Skip to main content
15,033,917 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a scenario where i have to update the parent table and insert record in child table.But while doing the same , oracle is throwing error as "integrity constraint (string) violated - parent key not found".

I went through internet and found that before inserting into child table we have to insert in parent first.But here the concern is i have record in parent table already i want to insert the child table with the key that has been assigned as foreign key from parent table.

What I have tried:

need suggestion on this to make it work as i am new to ORACLE
Posted
Comments
Vincent Maverick Durano 16-Aug-18 16:24pm
   
Without codes, we can only guess. What have you tried? Please show us the relevant code.
MadMyche 16-Aug-18 17:11pm
   
same as Vincent; are you getting the key from the Parent table and inserting it in with child?
Gerry Schmitz 17-Aug-18 1:54am
   
Have you "looked" at the "existing" parent keys in the parent and child and confirmed there is a problem?

It doesn't sound like it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900