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

silverlight - Applying a style to ItemContainerStyle in C# -

drupal - using views argument in the view tpl.php file -

php - Posting PHPBB Forum Thread/Post info in a website -