How to use TRUNC
function in SQL Server 2012, as I am getting an error:
'TRUNC' is not a recognized built-in function name.'
when I execute the statement
SELECT TRUNC(30.95, 1)
in SQL Server 2012
http://msdn.microsoft.com/en-us/library/ee634907.aspx
It is a DAX function, not a built in SQL function. It looks like those would be for use in Excel.
http://technet.microsoft.com/en-us/library/gg399181.aspx
The built in function for SQL Server 2012 are here:
http://msdn.microsoft.com/en-us/library/ms177516.aspx
ROUND ( 30.95 , 1 , 1 )
When the third parameter != 0 it truncates rather than rounds
http://msdn.microsoft.com/en-us/library/ms175003(SQL.90).aspx
Thanks to https://stackoverflow.com/a/44093/44743
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With