Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: ORA-02291: integrity constraint

Re: ORA-02291: integrity constraint

From: Steve Bell <swayne.bell_at_sympatico.ca>
Date: Wed, 04 Apr 2001 13:40:30 GMT
Message-ID: <3ACB218B.419B8D04@sympatico.ca>

Hi,
It appears you've defined a foreign key on the VEHICLE (looks like it's on the vehicle code ) ..you can confirm this by examining USER_CONSTRAINTS (if you own the table) ... just ensure the appropriate entry exists in the parent table and you can proceed.

Hth ,
Steve

ben_knill_at_hotmail.com wrote:

> I keep getting this error message but the error is on the table name,
> which is what I don't understand.
>
> ERROR at line 1:
> ORA-02291: integrity constraint (BKNILL.SYS_C007098) violated - parent key
> not
> found
>
> SQL> describe vehicle;
> Name Null? Type
> ------------------------------- -------- ----
> VEH_REG NOT NULL VARCHAR2(9)
> VEH_CODE VARCHAR2(5)
> VEH_RATE NUMBER(10,2)
>
> SQL> INSERT INTO VEHICLE (Veh_reg,veh_code,veh_rate) values
> ('&Vehicle_registrat
> ion_number','&Model_code',&Daily_rate);
> Enter value for vehicle_registration_number: W345 YRR
> Enter value for model_code: PE406
> Enter value for daily_rate: 20.00
> old 1: INSERT INTO VEHICLE (Veh_reg,veh_code,veh_rate) values
> ('&Vehicle_regis
> tration_number','&Model_code',&Daily_rate)
> new 1: INSERT INTO VEHICLE (Veh_reg,veh_code,veh_rate) values ('W345
> YRR','PE4
> 06',20.00)
> INSERT INTO VEHICLE (Veh_reg,veh_code,veh_rate) values ('W345
> YRR','PE406',20.00
> )
> *
> ERROR at line 1:
> ORA-02291: integrity constraint (BKNILL.SYS_C007098) violated - parent key
> not
> found
>
> --
> Posted via CNET Help.com
> http://www.help.com/
Received on Wed Apr 04 2001 - 08:40:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US