Good afternoon,
there is as small code deviation issue I found in 22.0.330. I’m not sure since when.
when there are 2 loop statement with the same loop variable, Invantive says it is already declared.
it seems that the exec tries to declare it 2 times, since there are two loops whereas it was not the case in the past
for the time being, the turnaround is to use a different named loop variable in the second loop.
example:
create or replace table mytable@inmemorystorage (v varchar2);
insert into mytable@inmemorystorage (v) values ('value1');
insert into mytable@inmemorystorage (v) values ('value2');
insert into mytable@inmemorystorage (v) values ('value3');
declare
l_store varchar2;
begin
for r in (select * from mytable@inmemorystorage)
loop
l_store := l_store || r.v
;
end loop;
for r in (select * from mytable@inmemorystorage)
loop
l_store := l_store || r.v
;
end loop;
end;
turnaround
create or replace table mytable@inmemorystorage (v varchar2);
insert into mytable@inmemorystorage (v) values ('value1');
insert into mytable@inmemorystorage (v) values ('value2');
insert into mytable@inmemorystorage (v) values ('value3');
declare
l_store varchar2;
begin
for r in (select * from mytable@inmemorystorage)
loop
l_store := l_store || r.v
;
end loop;
for f in (select * from mytable@inmemorystorage)
loop
l_store := l_store || f.v
;
end loop;
end;