I have some strange behaviour of QueryTool Beta 20.1.435 when having a combined create or replace table + loop with a for r in a @InMemory created table
See and test the statement:
begin
create or replace table t1@InMemoryStorage as select 1;
begin
for r in (select * from t1@InMemoryStorage)
loop
begin
dbms_output.put_line('hello');
end;
end loop;
end;
drop table t1@InMemoryStorage;
end
to make this working, the t1 table needs to exists before executing the statement:
create or replace table t1@InMemoryStorage as select 1;
begin
begin
for r in (select * from t1@InMemoryStorage)
loop
begin
dbms_output.put_line('do something');
end;
end loop;
end;
drop table t1@InMemoryStorage;
end
with this statement, no errors:
begin
create or replace table t1@InMemoryStorage as select 1;
drop table t1@InMemoryStorage;
end;
It seems that Query Tool tries to evaluate for r in (select * from t1@InMemoryStorage) before having been able to create or replace table t1@InMemoryStorage as select 1 or am I doing something wrong, like need to declare t1@InMemoryStorage ?)

