473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

I need Help for error ORA-02291

Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE LEASE_2 
  2.     ADD CONSTRAINT CLIENT_LEASE FOREIGN KEY 
  3.     ( 
  4.      CLIENT_ID1
  5.     ) 
  6.     REFERENCES CLIENT_2 
  7.     ( 
  8.      CLIENT_ID
  9.     ) 
  10.     ON DELETE CASCADE 
Error starting at line 244 in command:
Insert into STUDENT.LEASE_2 (LEASE_ID,MONTHLY_RENT,PAYMENT_TYPE,DURATION_OF_LE ASE,LEASE_START_DATE,LEASE_END_DATE,PROPERTY_ID,CL IENT_ID1) values
(1,130000,'CASH','TWO YEARS',to_date('13-SEP-12','DD-MON-RR'),to_date('13-SEP-14','DD-MON-RR'),1,123)


Error starting at line 245 in command:
Insert into STUDENT.LEASE_2 (LEASE_ID,MONTHLY_RENT,PAYMENT_TYPE,DURATION_OF_LE ASE,LEASE_START_DATE,LEASE_END_DATE,PROPERTY_ID,CL IENT_ID1) values
(1,130000,'CASH','TWO YEARS',to_date('13-SEP-12','DD-MON-RR'),to_date('13-SEP-14','DD-MON-RR'),1,123)


Error report:
SQL Error: ORA-02291: integrity constraint (STUDENT.LEASE_RENT) violated - parent key not found
02291. 00000 - "integrity constraint (%s.%s) violated - parent key not found"
*Cause: A foreign key value has no matching primary key value.
*Action: Delete the foreign key or add a matching primary key.
Jun 5 '13 #1
1 1351
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.


It's a fairly clear error message. It's saying that your foreign keys have no matching primary key in the contraint that you are creating. The error message even tells you how to fix it: Delete the foreign key or add a matching primary key.
Jun 5 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Charles Harrison Caudill | last post by:
I apologize if this question is covered in the FAQ, I was only able to find German and French versions. Does anyone know where I could get an English version, or a better translater than Google? ...
106
by: xtra | last post by:
Hi Folk I have about 1000 procedures in my project. Many, many of them are along the lines of function myfuntion () as boolean on error goto er '- Dim Dbs as dao.database Dim Rst as...
13
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
21
by: Anthony England | last post by:
Everyone knows that global variables get re-set in an mdb when an un-handled error is encountered, but it seems that this also happens when the variable is defined as private at form-level. So...
1
by: Jie | last post by:
Hi All, My tree view (Microsoft.Web.UI.WebControls.dll) has been running well till I got this error in design mode The following is the detail message: Resource file name:...
9
by: Gustaf | last post by:
I'm confused about structured error handling. The following piece of code is a simplification of a class library I'm working on. It works, and it does what I want, but I'm still not convinced that...
6
by: Bill Cunningham | last post by:
I just wanted to get some opinions on FIlE streams and error checking methods. I thought about EOF, NULL, and ferror. I have had trouble with EOF so there must be something there I'm not doing...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.