×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




You can't create an SQL index with fields from multiple tables.

Charles

On Mon, Mar 18, 2024 at 10:14 AM VERNON HAMBERG Owner via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

James


SQL indexes can be specified in F-specs in RPG and you can CHAIN to them.


So create an SQL index with the JOIN criteria you want - in more recent
version of the OS you can even include selection criteria in the CREATE
INDEX statement.


Vern


On Mon, 18 Mar, 2024 at 10:53 AM, James H. H. Lampert via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:


To: midrange systems technical discussion
Cc: jamesl@xxxxxxxxxxxxxxxxx
On 3/15/24 5:17 PM, Alan Campin wrote:
Yes key in a join logical is only on field in primary. Yes will do it
easy
in SQL.

Uh, I think the technical term here would be "mathematician's answer":
an answer that technically answers the question, without actually being
useful, e.g.,
"Can you tell me your name?"
"Yes."
"Will you tell me your name?"
"Yes."

Let's short-circuit the

Given (and I knew this much going in) that I can certainly get the join
I want in a STRSQL session with:

select * from FOO join BAR on SPAM = FROTZ order by HAM

But given that in SQL, a VIEW and an INDEX are two different things (as
opposed to an LF, which can be both),

HOW (short of pouring the query into a temporary PF in QTEMP, which I
also know how to do) do I turn that query into something that I can
CHAIN to natively in ILE RPG?

--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:
MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:
MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:
support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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