Reputation: 1
I have value in 1200.719994 and I want to convert it to the 1200.71000
how can I get that in sql view, I tried several rounding , ceiling function but i was not able to have it.
can any one help , please
Upvotes: 0
Views: 30
Reputation: 15140
SELECT ROUND( 1200.719994, 2, 1)
returns 1200.710000
. The 1
is the function parameter, anything other than 0 means truncate, rather than round.
Upvotes: 3
Reputation: 95554
Not sure what you mean by "ceiling function but i was not able to have it." CEILING
is available in all supported versions SQL Server; if it's not in the version of SQL Server you have, what version are you using? It was even available in SQL Server 2000.
It's not CEILING
you're after though, it's FLOOR
:
SELECT FLOOR(1200.719994 * 100) / 100;
Upvotes: 0