Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> CREATE CURSOR with VARIABLE in database packages?!?!
I would like to create/declare a cursor with a variable value which I pass through a procedure: e.g.
l_query varchar2 := p_query; //p_query is an select statment starting :
"select (*) from table..."
l_count integer;
CURSOR project IS l_query;
BEGIN OPEN project;
LOOP
FETCH project INTO l_count;
EXIT WHEN project%NOTFOUND;
END LOOP;
CLOSE project;
end showcount;
( select
Is there a way to create this cursor with a value, since the sqlstatment is
being built dynamically or
is there any other way to show/display the result of this sql statment ?
Thanks in advance.
Received on Mon Sep 23 2002 - 05:14:39 CDT
![]() |
![]() |