May 20, 2013 at 10:03 am
Hi,
I need
-13599.99 as 13600
162157.36 as 162157
7415781.64 AS 7415782
How can I achive that ?
thanks,
May 20, 2013 at 10:07 am
the round function has an optional parameter for the # of decimal places;
the Absolute value function converts any number to positive:
/*
-13599.99 as 13600
162157.36 as 162157
7415781.64 AS 7415782
*/;With MySampleData([myval])
AS
(
SELECT '-13599.99' UNION ALL
SELECT '162157.36' UNION ALL
SELECT '7415781.64'
)
SELECT
ROUND([myval],0) As Rounded,
ABS(ROUND([myval],0)) As PosiRounded
FROM MySampleData
Lowell
May 20, 2013 at 10:21 am
Thanks that worked perfectly!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply