Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Very Important crosS Applying yaK Herder
SELECT TOP 1 WITH TIES *
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.