Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> inserting rows within cursor loop
the result variable will hold the names of tables in my schema. in the code
below it hoses up at the insert portion. it doesn't recognize RESULT as a
variable it thinks RESULT is a table name. is there anything I can do?
thanks. poffs_at_tteam.com
Declare
RESULT user_objects.object_name%type;
result2 user_objects.object_name%type;
cursor c1 is
select substr(object_name,2,5) as plcde, object_name from user_objects
where object_name like 'T%';
begin
for i in c1 loop
result := i.object_name;
result2:=i.plcde;
insert into RESULT(read_date,planetcode,postnet_zipcode)
select read_date,planetcode,postnet_zipcode
from ext_report_t
where substr(planetcode,3,5) = result2;
end loop;
commit;
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Stephen E. Poff, Database Developer
TEAM Consulting, Incorporated
http://www.tteam.com/
Voice: (703) 256-6661 x128
Fax: (703) 256-3810
poffs_at_tteam.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Received on Thu Feb 04 1999 - 13:27:23 CST
![]() |
![]() |