I have needed a formula that will get me a number if it is <=100 and 100 for anything greater than 100, because clients required that % cannot be greater than 100%
I wanted a formula without IF or CASE statements.
And, here it is!
DECLARE @rr FLOAT
SET @@rr = 120
@rr - 0.5*(ABS(@rr - 100) + (@rr - 100))
I wanted a formula without IF or CASE statements.
And, here it is!
DECLARE @rr FLOAT
SET @@rr = 120
@rr - 0.5*(ABS(@rr - 100) + (@rr - 100))
No comments:
Post a Comment