Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL-SQL Procedure Parameter used with IN.
use dbms_sql to create dynamic sql statement. You will the information on how
to proceed in Application Developer's Guide. The way you have specified the
list it will be taken as a single entry (comma and all).
In article <3731E1A5.DE1BDA8C_at_futuremedia.co.uk>,
Darren M Lines <darren.lines_at_futuremedia.co.uk> wrote:
> Hi All,
>
> Hope somebody can help me with this.
>
> If I have a VARCHAR parameter that contains a comma seperated list, can
> I use that with the select IN?
>
> E.g.
>
> procedure testIn(p_aString VARCHAR2) IS
>
> l_cnt NUMBER;
>
> begin
>
> select count(*)
> into l_cnt
> from TestTable
> where field1 in (p_aString);
> end testIn;
>
> execute testIn('''1'',''2''');
>
> This approach dosn't seem to work. Any ideas greatly appreciated.
>
> Many thanks,
>
> Colin Smith.
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu May 06 1999 - 15:43:46 CDT
![]() |
![]() |