sql999 Starting Member
8 Posts
visakh16 Very Important crosS Applying yaK Herder
India 47173 Posts
SELECT TOP 1 WITH TIES * FROM table ORDER BY DATEDIFF(dd,Start_date,End_date) DESC
quote:Originally posted by sql999I tried it works, seems order by asc/desc + top can replace max(), min()thank you.