I need to round several data types, the number of which is closest to 2 places in SQL Server
For instance,
Input: 123.10000000 Output: 123.10
Thanks and Regards,Ismail
You will need to convert it:
Select Convert(numeric(19,2), @value)
You can use the Round function to do rounding:
Select Round(@Value, 2)
Will it CONVERT(DECIMAL(12,2), ROUND(123.10000000, 2))do the trick?
CONVERT(DECIMAL(12,2), ROUND(123.10000000, 2))
You can try:
select round(123.10000000, 2)
or
select cast(123.10000000 as decimal(12,2))
SELECT CAST(ROUND(InputValue, 2) AS money) AS OutputValue
Source: https://habr.com/ru/post/1790644/More articles:How to change the value of a query string parameter using redirection? - redirectсериализовывать экземпляры scipy rv_continuous и rv_discrete подклассов - pythonHow to achieve true modularity of the application using Akka in OSGi packages? - scalaWaste Disposal in the Worst Case at Mono - performancejquery selector performance - performanceWhat is a good sample program to demonstrate the incorrect handling of InterruptedException thrown by Thread.sleep ()? - javaCentering a div to the middle of a webpage? - htmlReading a text file in Qt - c ++обновление атрибута до нуля - rubyWPF removes child grid elements using name - layoutAll Articles