I have this SQL 2005 table as shown with Duplicate Rows,
I wish to delete the duplicate rows, using Distinct CandidateID, Max(CreatedOn).
CandidateID should be the final Primary Key.
The Result Table should be the same as this SQL.
SELECT CandidateID, MAX(CreatedOn) AS Expr2
GROUP BY CandidateID
I think I should be changing from this code below, which does not give me Max(CreatedOn)
select * into a_Candidate
from (select from db_Candidate) A
is this clear enough?