Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic query IN()-condition for cursor stored procedure
"Bark Mark" <bark_mark2003_at_yahoo.com> a écrit dans le message de
news:17b5c308.0405310018.42601343_at_posting.google.com...
> 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
If this is urgent search on google and you'll find many answers to this question as it is posted twice each month in the comp.databases.oracle.* newgroups.
Regards
Michel Cadot
Received on Mon May 31 2004 - 03:35:38 CDT
![]() |
![]() |