DECLARE @date1 datetime,
@date2 datetime
SET @date1 = '20050501'
SET @date2 = '20050505'
SELECT CASE WHEN @date1 > @date2 THEN @date1 ELSE @date2 END AS MaxDate
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.