Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: BULK UPDATE with FORALL
"Preston" <dontwantany_at_nowhere.invalid> wrote in message
news:Dv94j.499$Dh6.15_at_newsfe4-win.ntli.net...
> Dereck L. Dietz wrote:
>
>> Oracle 10.2.0.3, Windows Server 2003
>>
>> Can anybody explain to me why I'm getting an error stating that
>> element at index does not exist with the code below? I'm using
>> INDICES OF which I thought was supposed to take care of that.
>
> INDICES OF will handle missing 'rows' in a collection (i.e. when you
> delete a row during a loop), but it won't take care of a missing (null)
> 'column'. The error message is telling you that one of the 'columns'
> (elements) doesn't exists in the row it's failing on.
>
>
> --
> Preston.
So if any of the columns in the update below contains a NULL value for one of the values it would fail? From checking the data I do know that the AA_CLM_TOB array would have elements which would be NULL.
FORALL v_row IN INDICES OF aa_rowid
UPDATE clm_hdr SET clm_sub_type = aa_clm_sub_type(v_row), clm_tob = aa_clm_tob(v_row), clm_tob_4 = aa_clm_tob_4(v_row), clm_type = aa_clm_type(v_row), WHERE ROWID = aa_rowid(v_row);Received on Sat Dec 01 2007 - 08:34:00 CST
![]() |
![]() |