Home » SQL & PL/SQL » SQL & PL/SQL » multiple cursors
multiple cursors [message #37838] Fri, 01 March 2002 12:17 Go to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
Hi,
Iam having problem reading two cursors.
currently iam doing somethin like this
declare empcur cursor for
select distinct empid from emp where deptid = 100
open empcur
fetch int emp1
close empcur;

iam calling a stored procedure next to select rest of the emp information for each empid.
i have a cursor and iam fetching in
for(;;)
{
}
but iam getting only one row. i,e first empid information. not the rest.

how to get the rest of empid informations.
any help will appreciated
thanks
Re: multiple cursors [message #37847 is a reply to message #37838] Sun, 03 March 2002 23:16 Go to previous messageGo to next message
Manoj
Messages: 101
Registered: August 2000
Senior Member
hi sam,

use it
declare
cursor empcur is
select distinct empid from emp where deptid = 100;
begin
for i in empcur loop
call procedure(i.empid);
end loop;
end;
Re: multiple cursors [message #37867 is a reply to message #37847] Mon, 04 March 2002 09:19 Go to previous message
Sam
Messages: 255
Registered: April 2000
Senior Member
Thanks Manoj,

Do you think it will work if used it in Pro C,

Thanks
sam
Previous Topic: Trigger not firing
Next Topic: Compile sechema Error
Goto Forum:
  


Current Time: Fri Apr 26 08:09:45 CDT 2024