... and it takes the columns from the first specified table.
If you have a right outer join and there is no match, all key fields
(specified in the using clause are NULL!)
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> On Behalf Of Charles Wilt
Sent: Freitag, 11. Mai 2018 19:05
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Columns in USING clause for join don't appear in SELECT *?
A few...not as many as I'd like...
Besides the problem posed by legacy RPG standards of specifing a different
prefix for the same field in different files...
The using clause on Db2 for i only supports a single join.
Meaning the following is not supported...
select *
from tbl1
join tbl2 using (fld1, fld2)
join tbl3 using (fld1, fld2)
It should be IMHO..
Perhaps requiring parenthesis to explicitly specify a join order...
select *
from (tbl1
join tbl2 using (fld1, fld2))
join tbl3 using (fld1, fld2)
Charles
On Fri, May 11, 2018 at 9:21 AM, Dan <dan27649@xxxxxxxxx> wrote:
Sorry, I meant Charles!
- Dan
On Fri, May 11, 2018 at 11:20 AM, Dan <dan27649@xxxxxxxxx> wrote:
Thanks for that, John! I can only guess that I've not done many
queries that fall in this category.
--
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: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
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:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.