Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Hostarrays and UPDATE with missing records
wrap it up in a pl/sql block (using host-arrays):
begin
update
if sql%no_data_fount then
insert
end if;
end;
-- reply address is altered to keep the spam down remove the nospamplease part to reply... Brian Rasmusson <br_at_belle.dk> wrote in article <34FA8D53.8A076495_at_belle.dk>...Received on Tue Mar 03 1998 - 00:00:00 CST
> Hi,
>
> i'm in the process of optimizing some of our Oracle applications, but
> have run into a tricky situation.
>
> I have some code like this:
>
> UPDATE record
> IF UPDATE failed
> INSERT record
> END IF
>
> Can i achieve the same result using host arrays? I would like to try to
> UPDATE e.g. 100 records at a time, and have an indicator of which
> failed, and then INSERT those. I don't see anything about this in the
> manuals, so i guess it is not possible.
>
> Any other solutions than issuing the above code one time per record?
>
> Best regards,
> Brian
>
> ------------------------------------------------------------------------
> Brian Rasmusson, Software engineer & analyst e-mail: br_at_belle.dk
> Belle Systems A/S web : www.belle.dk
> Network, Internet and communication specialists phone : +45 59442500
> ------------------------------------------------------------------------
>