× 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.



I'm sorry, I thought I was being clearer than I was.

I meant

CREATE TABLE MyArray AS
Select Field1, Field2, Field3
From *libl/MyTable

Then, I don't know exactly how you plan to use your array. If I wanted the equivalent of MyArray(6), I could use SQL or a CHAIN operation.

Select * from MyArray where RRN(MyArray)=6

OR

CHAIN 6 MyArray

-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Dennis Lovelady
Envoyé : jeudi 3 septembre 2009 12:36
À : 'RPG programming on the IBM i / System i'
Objet : RE: SQL select into [array]?

Is there a reason why one could not use CREATE TABLE AS... and use
that table instead of the array?

________________________________
* Subject: SQL select into [array]?
* From: "Koester, Michael" <mkoester@xxxxxxxxxxxxx>
* Date: Thu, 27 Aug 2009 11:54:33 -0400

I am looking for an elegant way to code an embedded SQL
statement that
selects into, where the host target is an array.

Does that help with the question? What would the SQL SELECT
look like then?
How would the table be build? Maybe we should see a little
more detail about what follows "CREATE TABLE AS..." ?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"When I was a boy of fourteen, my father was so ignorant I
could hardly stand to have the old man around. But when I
got to twenty-one, I was astonished at how much he had
learned in seven years."
-- Mark Twain

--
This is the RPG programming on the IBM i / System i
(RPG400-L) mailing list To post a message email:
RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.