Hi All,
I have a fairly large table with approx 30K rows that updates every
night via a cron script that automatically downloads the 2 new csv's.
The problem is the files are downloaded from two completely different
systems and I've recently found duplicates!
To make matters worse, the two feeds do not share a common unique key.
The following snippet is an example of the data where row 1 is from
feed 1 and row 2 is from feed 2
key|streetnum|streetname|streetsuffix|unitnum|
---------------------------------------------
12345|2069|Happy St.|NULL|A-2|
ACGH23|2069|Happy|St.|A-2|
So my question is: How can I identify duplicate records using multiple
columns without looping through the entire recordset in PHP?
I have successfully found other duplicates by COUNT(key) ...GROUP BY
key HAVING COUNT(key) >= 2.
I tried using CONCAT to combine the columns into one string but didn't
work because CONCAT fails if any column is NULL.
Any help would be greatly appreciated.
Tim