Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Cursor curiosity
I have the following code in a program which will work if the outer cursor
isn't sent a parameter as part of the procedure call. If no parameter is
put in the code then the inner cursor will work and pick up data. However,
IF a parameter is put in the code then the inner cursor doesn't pick
anything up.
The procedure is being written using Oracle 9i version 2 on a Windows XP Pro platform.
Any ideas?
PROCEDURE team_hist ( p_team IN team.team%TYPE ) IS
CURSOR cr_team ( p_team IN team.team%TYPE )
IS
...
CURSOR cr_team_history ( p_team IN team_history.team%TYPE )
IS
...
BEGIN FOR c1 IN cr_team ( p_team ) <=== will work if ( p_team ) not in code LOOP ...
FOR c2 IN cr_team_history ( c1.team ) LOOP ... END LOOP;
END LOOP; END team_hist; Received on Sat May 13 2006 - 18:39:24 CDT