× 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.



On 28 Mar 2013 16:28, Charles Wilt wrote:
Don't know if this technique has ever been posted here or not, but I
ran across the technique last night on a DB2 LUW forum and it works
just fine on DB2 for IBM i...

If you have a need to compare the contents of two tables to determine
if they match, here's the easy way.

select * from table1
EXCEPT
select * from table2

<<SNIP>>

I was doing it on 7.1, but according to the manual, EXCEPT is
supported starting at v5r4.

I believe that should be v5r3:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/sqlp/rbafywhatsnew.htm
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/sqlp/rbafyexcept.htm#rbafyexcept
_i Using EXCEPT keyword i_
"≥≥_Start of change_≤≤
The EXCEPT keyword returns the result set of the first subselect minus any matching rows from the second subselect.
...
≥≥_End of change_≤≤"

Caveats: the tables must have a primary key; or be a uniquely keyed
physical.

I do not think that is an accurate claim. See my example showing the use of the EXCEPT keyword without either type of key\constraint [found in a thread using an example of a very poor subject, possibly one of the /stupidest/ subject lines ever ;-) , other than an empty subject line or a Digest name; thus perhaps, few wasted any time reviewing the OP or any replies]:
Subject: Stupid question
http://archive.midrange.com/midrange-l/201205/msg00085.html


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.