× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I suspect that's the simple answer, Charles. I just dislike rules I don't understand. ;)

Joe

Joe,

I don't know where the rules might be spelled out...

But I'd say at 6.1 and higher you shouldn't try to qualify your key field.

Charles

On Mon, Mar 14, 2011 at 2:57 PM, Joe Pluta<joepluta@xxxxxxxxxxxxxxxxx> wrote:
On further examination, the USING rules are not as clear cut as they
might otherwise be.

TRUE:
This works at v5r4 but not 7.1:
select a.key, b.key, a.data, b.data
from fileA A join fileb B using (key)


and

this works at 7.1 but not v5r4:
select key, a.data, b.data
from fileA A join fileb B using (key)


However:

This works at 7.1:
select a.key, a.*
from fileA A join fileb B using (key)


but this does not work at 7.1:
select b.key, a.*
from fileA A join fileb B using (key)


I don't quite get the rules. I also don't understand how a.key + a.*
doesn't give me either a syntax error or a duplicate column. Either key
is part of a or it isn't, and it seems that the SQL engine isn't quite sure.

I hate to stop using USING, because it really is helpful especially when
you have more than one field in the JOIN, so I need to get a better
handle on this.

Joe




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.