Hi James,i really appreciate your help, I made that you say but it doesn't works, I remplaced my original code :SELECT Action,OldValue,NewValue,Created,Creator,DataKeyFROM dbo.EbcDataLog AS edWHERE (DataKey IS NOT NULL)
by the code that you said me but i'm still receiving two or more rows per item quote:
Originally posted by James K
[code];with cte as ( select *, row_number() over( partition by Datakey order by Created DESC) as RN from YourTable) select * from cte where RN = 1;