×
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.
YES!
Both work.
Now to understand why!
Thanks again,
Lance
"Elvis Budimlic" <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx> 3/31/2009 1:25 PM >>>
Thinking about it a bit more, this might work as well:
select a.*
from myFile a exception join
myFile b join myFile c on b.address = c.address and b.account <>
c.account
on a.account = b.account and a.address = b.address
Join the mismatched values (b to c) then get the exceptions (a to b).
Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
-----Original Message-----
Subject: RE: SQL question
Thank you, Elvis. When I ran your suggestion, I got:
KEY ACCOUNT ADDRESS
1 11 11 MAIN
3 11 11 MAIN
5 14 13 MAIN
7 16 15 MAIN
8 17 16 MAIN
9 16 15 MAIN
10 18 17 MAIN
which is very nearly what I want.
Unfortunately, it grabs key 7 and 9, which
it should not because key 6 (which is wrong in
my e-mail and should be account 15, address 15 Main)
gives a different account number for the same address.
Your code gives me a whole to tool, CTE's, so I am going
to look into that approach. It seems, as you say, a good
way to break down the problem.
Thanks again,
Lance
As an Amazon Associate we earn from qualifying purchases.