This is even faster, on a tiny table:
SELECT n1, n2 FROM table1
INTERSECT
SELECT n2, n1 FROM table1
WHERE n2<n1;
Moreover, the original query does not give the desired result - in the
example table, 2,4 is also returned.
Of course, there remains the question as to why your UNION query seems to
have hung...
Tom
-----Original Message-----
From: Jim Morris
Did you try to time a simpler select:
SELECT min(n1, n2) as new1, max(n1,n2) as new2 FROM table1 group by new1,
new2 having count(*)> 1
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users