STR function in SQL
1 answer
Because STR operates on the FLOAT datatype, the decimal constant is converted to FLOAT before converting to VARCHAR of the requested size. And as we all know, FLOAT values ββare the approximate number you thought you would get :-), so you'll get great values ββafter the decimal point.
For example, try STR (1234.1,44,16) and you get 1234.0999999999999000.
If you read the manual at http://msdn.microsoft.com/en-us/library/ms189527.aspx it says float_expression - Is an expression of approximate numeric (float) data type with a decimal point
. Yes, IT'S COMING.
0
source to share