Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loop Cursor Fetch Insert Rows Into Global Temporay Table

528631Nov 8 2007 — edited Nov 9 2007
Hi friends,

I want to know there where is the problem in my this query

cursor c1 is select empno
from scott.emp;
b number;
begin
open c1;
loop
fetch c1 into b;
exit when c1%notfound;
insert into scheema.a1
(a)
values
(b);
commit;
end loop;
close c1;
end;
---------------------------------
There is no any error displaying while proceeding this query but the table a1 which is (Global temporary table with ON COMMIT PRESERVE ROWS option enabled) does not gets any records. Kindly let me know the problem.

Regards.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2007
Added on Nov 8 2007
6 comments
765 views