Painting Blue Code
Simple, self-explanatory code snippets.
2012-06-28
TSQL - How to get the lowest of two values using arithmetic
declare
@val1
as
float
;
declare
@val2
as
float
;
set
@val1
=
3.1
;
set
@val2
=
3
;
select
0.5
*
((
@val1
+
@val2
)
-
ABS
(
@val1
-
@val2
));
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment