HELP....CURSORS

From: Ahsan Jalil <ahsan_at_wraith.cs.uow.edu.au>
Date: 1995/05/13
Message-ID: <3p1g5d$hdk_at_wraith.cs.uow.edu.au>#1/1


Iam having trouble in using cursors i.e how to define two cursors one after the other in a PL/SQL procedure. What iam trying to do is

create procedure temp(....) as

cursor a is

		select...
		from....
		where...

begin
for var in a
loop

        (statements)
end loop

cursor b is

                select...
                from....
                where...

begin
for var in b
loop

        (statements)
end loop
end temp;

THE PROBLEM IS THAT IT'S NOT WORKING THIS WAY i.e I am not been able to  define more than one cursor in a procedure. CAN WE DO IT IN THIS WAY OR IS THERE ANY OTHER WAY ?. The second problem is how to change the headings while u r in procedure. i.e how to change

EMP_NAME EMP-NO


JACK            123
MARK            456

to

Employer Name Employer No


JACK            123
MARK            456

REMEMBER WE R WORKING IN A PROCEDURE
Therefore the commands like SET HEADINGS OFF DOES NOT WORK..

Please reply
Thank you in advance
ahsan_at_wraith.cs.uow.edu.au Received on Sat May 13 1995 - 00:00:00 CEST

Original text of this message