Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Dynamic query IN()-condition for cursor stored procedure
Hello,
I want a dynamic IN-condition for my cursor in a stored procedure... let's say it is comparable with this example :
SET SERVEROUTPUT ON
DECLARE
i PLS_INTEGER;
InStr VARCHAR2(20) := '10,30';
BEGIN
SELECT COUNT(*)
INTO i
FROM emp
WHERE deptno IN (InStr);
dbms_output.put_line(i);
END;
/
this needs to return "9", but it returns a "0". If you use it with Instr = '10' it works, in all other cases I'm stuck with it...
Hope someone can help asap, it's a little bit urgent...
Thanks a lot
Bark Mark Received on Mon May 31 2004 - 03:18:53 CDT
![]() |
![]() |