Re: PRO*C QUESTION: dynamic IN clause

From: Steve Holdoway <steve_at_aethos.co.uk>
Date: 1997/01/21
Message-ID: <32e4b32d.340590523_at_atlas>#1/1


On 21 Jan 1997 11:26:40 GMT, citton_at_shom.fr (Citton Laurent) wrote:

>Hi everybody,
>
>I would like to make a query in PRO*C with an IN clause ,for example:
>EXEC SQL select count(*) into :var from table where xxx in (:liste);
>
>liste is a varchar variable passed in parameter to the PRO*C.
>
>Unfortunately, it does NOT work...
>
>Any idea to solve that simple problem ?
>
>Please answer by mail too. Tanks a lot
>

Use a dynamic sql query, where you build up the complete select statement in a string, and then exec sql that string.

Good luck!

Steve Received on Tue Jan 21 1997 - 00:00:00 CET

Original text of this message