> Normally I'd write a > query with a sub select to get that information - something like this:
Normally I'd NOT use a subquery ;-) > SELECT a.* > FROM table a > WHERE a.ssn IN (SELECT b.ssn FROM table b GROUP BY b.ssn HAVING > count(b.ssn) > 1); > > However, I don't have MySQL 4.1.x so the sub select is out of the > question. I've decided to identify the duplicate socials and dump them > into a table. Join the table with the dups to the table storing the > identification details and then drop the dups table. Why not use a join in the first place? SELECT a.* FROM table1 AS a JOIN table2 AS b USING (ssn) GROUP BY b.ssn HAVING count(b.ssn)>1 Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]