maximum of 2 values

  • isn't there smthg in t-sql to get the maximum value between 2 dates like in any other language??!!!!

    insert into table(field) values max(var1,var2)

     

  • INSERT INTO Table(Field) SELECT CASE WHEN @Var1 > @Var2 THEN @Var1 ELSE @Var2 END AS Field

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply