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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.