Hi
I need SQL code that will identify possible duplicates in a table. Lets say my table has 4 columns:
ID (primary key)
Date1
Date2
GroupID
(Date1, Date2, GroupID) form a unique key.
This table gets populated with blocks of data at a time, and it often happens that a new block is loaded in that contains a number of records that are already in there. This fine as long as the unique key catches them. Unfortunately, sometimes Date1 is empty (or at least '1900/01/01') either with the first or subsequent uploads.
So what I need is something to identify where the (Date2, GroupID) combination appear more than once and where for one of the records Date1 = '1900/01/01'
Thanks
Karl