Need the more recent between two DATETIME's in SQL -


i have 2 sql datetime's need compare. need set value of column more recent date between two. there function this?

use case statement.

update yourtable     set yourcolumn = case when @date1 > @date2 @date1 else @date2 end     where... 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -