SQL RPG clause: WHERE IN ( :ARRAY) ? - IBM AS400

This is a discussion on SQL RPG clause: WHERE IN ( :ARRAY) ? - IBM AS400 ; Hello I'm trying with SQL ILERPG to make the following clause: .......... where in ('xxxxx', 'xxxxxx') I like to use an rpg array in that clause how do I have to do that. where in ( :arrayname) ? and if ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: SQL RPG clause: WHERE IN ( :ARRAY) ?

  1. SQL RPG clause: WHERE IN ( :ARRAY) ?

    Hello

    I'm trying with SQL ILERPG to make the following clause:

    ..........
    where in ('xxxxx', 'xxxxxx')
    I like to use an rpg array in that clause how do I have to do that.

    where in ( :arrayname) ?
    and if it is possible how do I have coded the array?

    Regards
    Jaap


  2. Re: SQL RPG clause: WHERE IN ( :ARRAY) ?

    Hi,

    it is not possible to specify an array or array elements in embedded
    SQL.
    The only way is to use a data structure with subfields that will be
    overlayed by the array and than use the subfields in the SQL-
    Statement.

    Birgitta

    On 23 Feb., 08:59, "Hammie" wrote:
    > Hello
    >
    > I'm trying with SQL ILERPG to make the following clause:
    >
    > .........
    > where in ('xxxxx', 'xxxxxx')
    > I like to use an rpg array in that clause how do I have to do that.
    >
    > where in ( :arrayname) ?
    > and if it is possible how do I have coded the array?
    >
    > Regards
    > Jaap




+ Reply to Thread