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



We have a requirement to create an audit log of key values within a file
that register differences. This will be used downstream to update other
files in a data warehouse type of system. Secondly, the actual file
difference need to be synced. So, I've done the following with the EXCEPT
keyword as a driver. I believe this performs well when looking for missing
values based on a key, but please noticed where I do something like
"select * from a except select * from b". This is to get records that
exist in both files, but have some kind of record difference that needs to
be updated. I assume that this is a really brute force method of figuring
out what records don't match, so I wondered if there was a better way.
Ideally I would think something like a "join" of the two files, and then
saying "where a.* <> b.*", but that kind of syntax isn't available.

create table darren/sild as(
with t1 as(
select i1.ILINVN,i1.ILLINE,'D' as OPER
from (select ILINVN,ILLINE from ERPLXFINF/SIL
except select ILINVN,ILLINE from ERPLXF/SIL) i1
union
select i2.ILINVN,i2.ILLINE,'I' as OPER
from (select ILINVN,ILLINE from ERPLXF/SIL
except select ILINVN,ILLINE from ERPLXFINF/SIL) i2
)
select * from t1
union all
select T2.ILINVN,T2.ILLINE,'U' as OPER from
(select * from ERPLXFINF/SIL except select * from ERPLXF/SIL) T2
where (T2.ILINVN,T2.ILLINE) not in (select ILINVN,ILLINE from T1)
) with data


___________________________________
Darren Strong
Dekko


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.