Hi all,
I am using a query to find differences in data between two similar tables with similar structures. The Query is something as shown below.
My problem is this works with smaller data sets but in my case since I have big tables, this gives a memory error. Is there any other workaround I can try, please advise.
Thanks
IQ
select * from (
select id, name,
sum(case when src=1 then 1 else 0 end) cnt1,
sum(case when src=2 then 1 else 0 end) cnt2
from
(
select id, name, 1 src from A
union all
select id, name, 2 src from B
)
group by id, name
)
where cnt1 <> cnt2;