Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Problems with PL/SQL
Klaus Zeuch wrote:
>
> Sorry,
>
> I forgot: cursor-attributes like %rowcount are not available in FOR <record>
> IN <SELECT-Statement> loops;
> use a counter inside the loop and use the mod-function against this counter:
>
> either
>
> declare
> v_count number := 0;
> begin
> for v_c1 in (select * from table_source) loop
> insert into table_dest values (v_c1.column_name1,
> v_c1.column_name2,.....);
> v_count := v_count + 1;
> if mod(v_count,1000) = 0 then
> commit;
> end if;
> end loop;
> commit;
> end;
>
> Klaus
Logically this will work, but it will probably also generate a "snapshot too old" error if the number of rows is sufficiently large. Received on Tue Aug 15 2000 - 14:53:40 CDT
![]() |
![]() |