Re: What is the problem with this stored procedure?

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 11 May 2006 09:06:20 -0700
Message-ID: <1147363581.412624_at_bubbleator.drizzle.com>


Wallace wrote:
> 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..

Look at the working demos in Morgan's Library at www.psoug.org under ARRAY PROCESSING.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu May 11 2006 - 18:06:20 CEST

Original text of this message