× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Maria

I don't think it can work. The IN predicate uses a comma-separated list of values, or the results of a subquery (or subselect - I am not sure which term is right).

A DS, as I understand it at present, doesn't give you a list like the first item, there are no commas in it, for example.

A more basic question is, can any array be used for the values in an IN predicate? If not, certainly a subfield array could not be so used.

Now is it possible? Is it a reasonable idea for embedded static SQL? Maybe - so this might a good topic for an RFE.

Regards
Vern

On 7/23/2020 2:34 AM, Maria Lucia Stoppa wrote:
Hi all,
I am wondering whether a DS with an array as a subfield might be used as
the argument of an SQL "IN predicate".

My system is running V7R2 and I make use of SQL RPG ILE quite intensively,
so I know DSs with arrays inside can be used to fetch data in case of
multiple rows, but I like to use them within the "IN predicate" in a static
SQL statement.

So far, the only way I have it working is by naming each array's element
and build a list with them.

Nor I found evidence of it in the IBM public boulder.

But I might have missed something, and that's why I am asking for your
opinions.

Any thought will be appreciated.

Thanks



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.