Hello I need to find a function tha allowed to obtain the following result:
SELECT FFFF(14.9879,2)
go
14.98
which function I must use?SELECT ROUND(14.9879,2,1)
Using 1 as the third parameter causes ROUND to truncate (round down).
This won't necessarily cause your application to *display* only two
decimals. The display format of numeric values is determined by your
application, not by SQL Server.
--
David Portas
SQL Server MVP
--|||What about
Select ROUND(14.98756,2,1)
Would be some numeric chopping, else you should use LEFT funtion with
CHARINDEX.
HTH, Jens Suessmeyer.
"pippo" <pippo@.discussions.microsoft.com> schrieb im Newsbeitrag
news:4934B137-6A93-4824-AA7C-DD80387A206B@.microsoft.com...
> Hello I need to find a function tha allowed to obtain the following
> result:
> SELECT FFFF(14.9879,2)
> go
> 14.98
> which function I must use?
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment