Saturday, 14 September 2013

The best way of eliminating semi-duplicate! records in Oracle

The best way of eliminating semi-duplicate! records in Oracle

I have some records like
a,b
b,a
a,c
c,a
b,d
d,b
b,f
f,b
...
in my query result. (They are emails) What is the best way to have:
a,b
a,c
b,d
b,f
and eliminate b,a and c,a, d,b, f,b?
I tried
SELECT *
FROM ...
WHERE MOD(ROWNUM/2)=0
But it just returns the first row

No comments:

Post a Comment