Quantcast
Channel: MS SQL – Datasummit
Viewing all articles
Browse latest Browse all 11

Cool way to calculate inline MAX of two values in MS SQL

$
0
0
— The following expression calculates ==> max(@val1, @val2) SELECT 0.5 * ((@val1 + @val2) + ABS(@val1 – @val2))   Kudos to splattne.

Viewing all articles
Browse latest Browse all 11

Trending Articles