|
Responses inline
> -----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx / Vern Hamberg > Sent: Wednesday, August 11, 2004 6:12 PM > > The information on QRYDFN conversion is in chapter 12 of the V5R2 Query > Management Programming manual. A search on QRYDFN might be more > fruitful, too.
Oh, I thought you were pointing me to a discussion of a T01 <-- T02 <-- T03 multiple joins. OK, I see the section on conversion. It's apparent that the conversion is pretty basic, eh?
> You have "AMFLIB/CIVSPCL0 T02" specified twice. The second one follows a > comma, which is also invalid. > > JOINs are cumulative. Each JOIN works against the result of the previous > JOIN. So the columns you want for the JOIN to T03 are there from the > previous set of JOINs. Try this:
YESSSSSSS! That was it! Although, I admit to being confused by the syntax. How does the SQL processor know to join T03 to T02 and not to the others? Is it the field matching referring to T03 & T02 fields in the "on (" section? Or does this get more into the black box magic of SQL and most of the time I won't care how it does it, it just does?
select * from a join b on b.join1 = a.join1 join c on c.join1 = b.join1
might not perform as well as
select * from a join b on b.join1 = a.join1 join c on c.join1 = b.join1 and c.join1 = a.join1
Vern
Thanks Vern!
db
-- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
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.