Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> insert rows into dynamically named tables within cursor
i need to insert rows into dynamically named tables within a cursor. it
doesn't like the variable that represents the tables, RESULT. It thinks
RESULT is a table name. Anything I can do? Thanks in advance.
Declare
result user_objects.object_name%type;
result2 user_objects.object_name%type;
cursor c1 is
select substr(object_name,2,5) as bbb, object_name from user_objects where
object_name like 'T%';
begin
for i in c1 loop
result := i.object_name;
result2:=i.bbb;
insert into result(fff,ggg,hhh)
select fff,ggg,hhh
from ext_report_t
where substr(hhh,3,5) = result2;
end loop;
commit;
end;
‰‰
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Feb 04 1999 - 15:15:35 CST