June 29, 2011 at 3:33 pm
Hi All,
Would like to round number to lower bound instead of upper bound in SQL.
Example: round(xxx.555,2) is retruning xxx.56. I want get result as xxx.55.
Thanks in Advance.
June 29, 2011 at 3:46 pm
Look at the function FLOOR()
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
June 29, 2011 at 3:53 pm
Thank you for your quick response.
Floor will give me the lowe bound with out decimals.
I want the lower bound in decimal part.
Would like to see 113.555 as 113.55 instead of 113.56.
June 29, 2011 at 4:23 pm
FLOOR(113.555 * 100) / 100
June 29, 2011 at 7:18 pm
Bhogadi (6/29/2011)
Hi All,Would like to round number to lower bound instead of upper bound in SQL.
Example: round(xxx.555,2) is retruning xxx.56. I want get result as xxx.55.
Thanks in Advance.
Please lookup the 3rd operand of ROUND in Books Online. It's one of those things that people read about and forget.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply