Re: Dynamically cursor ?
Date: Fri, 20 Oct 2000 20:38:19 -0700
Message-ID: <sv23jtfq3iqm46_at_corp.supernews.com>
"peter" <misybh_at_tpts7.seed.net.tw> wrote in message
news:8sp459$f4r_at_netnews.hinet.net...
> Hello
> I have a cursor which SQL-statement is as followong
>
> cursor is
> select A
> from emp
> where emp_no in(XXXXXXXX);
>
> what I wish is that I can pass a string into XXXXXXX dynamically..
> can I write this?
>
> cursor is
> select A
> from emp
> where emp_no in &v_string;
> v_string:='('201','202','204');
> ????????
Yes but you're missing the ending quote and the "inner" quotes need to be changed in order for the compiler to not see them as ending quotes:
v_string:= '(''201'',''202'',''204'')';
-Matt Received on Sat Oct 21 2000 - 05:38:19 CEST