|
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,intensively,
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
so I know DSs with arrays inside can be used to fetch data in case ofstatic
multiple rows, but I like to use them within the "IN predicate" in a
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
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.