declare
type yy is table of t12.name%type index by binary_integer;
y yy;
n number:=1;
begin
execute immediate 'create table rat1 ( name varchar2(10) )';
commit;
select name bulk collect into y from t12;
for i in (select id,name from t12)
loop
dbms_output.put_line(y(n));
n:=n+1;
end loop;
forall i in y.first..y.last
insert into rat1 values(y(i));
end;
Its giving ora-00942.
I checked about it…at some website it was mentioning that you have to give following privilages…
grant select on sys.v_$paramenter to abc
I am unable to do that also..Can any body help me with this
change it so that it is executed in 2 successive steps (NOT in one PL/SQL anonymous block like it is now):
First this
THEN as a SECOND block this
EDIT – as per comment:
Before execution the WHOLE PL/SQL block is parsed – all objects used in an PL/SQL block must exist BEFORE the PL/SQL block is executed…