I have a table in which a file is imported daily and, unfortunately, it was created without a constraint so I have to find issues where the same records may have been imported two days in a row.
So, I want to write a query that will tell me when records with a particular “header date” were imported more than once (the header date should be unique each day). The field I’m using for import date is a datetime “dataDate” field. My header date field is called “headerDate” and is a datetime field as well, and my table is tblCases. Any help is appreciated. Thanks!
This will give you the dates with more than one row:
Of course this is extendable to give you the rows that are duplicated in the table for whatever columns you specify: