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.