I have a table with a date field.
I want to write up sql stored procedure that compares against each other to remove records which are a little older than other records.
There will be always only two different times. Probably they will be different dates but I just want to cover in case the dates are same but different times.
I want to find a way to programmatically search those records and remove into the archive table.
As an example, I have tblDataName and tblDataNameArchive.
tblDataName(id,name,createdate) <==id is guid