Paul Vlad,
>To find duplicates by address:
>
>select PrimaryKey, Address, count(*) as MyCount from MyTable group by Address
>
>If MyCount is > 1... duplicates. To add the condition on dates, write a UDF
The first part is obvious and I understand this approach well.
that returns the number of the week from
>a date (based on your conditions) and select a new column beased on this new UDF and add this column to the GROUP BY clause.
>
Sorry, this part I didn't understand. Could you please tell more?
>
>>Hi everybody,
>>
>> I have a problem, which seems to me quite complicated. I need to find possible dupes in my table by address information and the date (date of transaction) should be in the particular range od days, say, within one week.
>>
>> As I can judge, it could not be done in one query...
>>
>> Could you please advise me more efficient way to find these possible dupes?
>>
>> The number of dupes may vary (in most cases, 2, but could be 3,4 or more).
>>
>> Thanks in advance.
If it's not broken, fix it until it is.
My Blog