Hi,
I am working on a program where I need to return every row that contains a duplicate serial number.
I have this working but it only returns the serial number and the count where as I need to return each row that the duplicate appears on.
I have been informed I need to join this query back to the original table on serial but cannot work out how to do it.
SELECT serial,
COUNT(serial) AS NumOccurrences
FROM address
GROUP BY serial
HAVING ( COUNT(serial) > 1 )
Any help would be greatly appreciated.
I am working on a program where I need to return every row that contains a duplicate serial number.
I have this working but it only returns the serial number and the count where as I need to return each row that the duplicate appears on.
I have been informed I need to join this query back to the original table on serial but cannot work out how to do it.
SELECT serial,
COUNT(serial) AS NumOccurrences
FROM address
GROUP BY serial
HAVING ( COUNT(serial) > 1 )
Any help would be greatly appreciated.