I have to extract mismatching situazions betweens monetary values from 2 tables.
At the moment I have this query:
(SELECT SUM(monValue) FROM TableA WHERE PK = 'Pk123' GROUP BY PK)
(SELECT monValue FROM TableB WHERE PK = 'Pk123')
for several hundreds of PkXXX.
If they match, this SELECT returns zero.
But I need to modify it to return me only when there is mismatching,
with the value ok PK that mismatch (the mismatching value is not necessary).
Has anyone idea how to solve this problem?
Thanks a lot in advance.