Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Problems with PL/SQL

Re: Problems with PL/SQL

From: Klaus Zeuch <KZeuchnospam_at_hotmail.com>
Date: Wed, 16 Aug 2000 09:46:06 +0200
Message-ID: <8ndiro$659$1@papyrus.erlm.siemens.de>

As a *writer* to the rollback segments you won't get the snapshot too old error - only *readers* of the destination-table with scn's prior to the writer's scn will receive that error. You will get an error as *writer* if the rollback-segment can't be extended any more.

Walter T Rejuney <BlueSax_at_Unforgetable.com> schrieb in im Newsbeitrag: 39999FC4.E5BF6B79_at_Unforgetable.com...
> 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 Wed Aug 16 2000 - 02:46:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US