Subject | Re: [firebird-support] Re: Inserting only one row for each distinct id (ignoring duplicates) |
---|---|
Author | Helen Borrie |
Post date | 2008-11-24T10:59:48Z |
At 09:36 PM 24/11/2008, you wrote:
./heLen
>> The error message mentions the name of the constraint. Trace that toIt refers to the NOT NULL constraint on Inventory_ID. Another thing you forgot to mention was that inventory_id in job_car_inventory table was nullable. So you are getting a primary key violation because your query has picked up a null inventory_id and is trying to post it to the PK column. There's your answer: you will need to exclude any records from the job_card_inventory table where inventory_id is null.
>see
>> what column(s) have the unique constraint that gets violated. Use
>> FlameRobin or some other easy-to-use tool to obtain and interpret the
>> relevant metadata.
>>
>> Kjell
>> --
>Hi
>
>INTEG_36 refers to Inventory_ID constraint
./heLen