Forum Discussion
manolis_thess
Sep 09, 2024Copper Contributor
Reading Float data with float variable in stored procedure rounds numbers
Hi, In managemnet studio Declare @@Amount FLOAT SELECT Sum(Amount) From Docs WHERE DocID IN (104482,104483,104484,104486,104489,104491,104493) displays in results window 178457,05 SELECT @...
rodgerkong
Sep 11, 2024Iron Contributor
When you use PRINT to diplay a float expressions, it will use Implicit conversions rules to convert a float expressions to varchar, just like the result that use CAST like this sample.
DECLARE @a float
SET @a = 178457.05
SELECT CAST(@a AS varchar(20))SSMS query result window use other rules to format output, so it looks different.