• tommyh (9/16/2010)


    Nice question. Though the explanation isnt entirely accurate. Its not rounded, its truncated.

    If the question had been, lets say

    declare @r decimal(5,2)

    set @r= round(5/3.2,1,3)

    select @r

    Then we would get 1.5 wheras a round would have given us 1.6 (change last parameter in Round to 0... or remove it all together).

    Right, the 3rd parameter of round is the most important one. It's value 3 is not typical but greater than zero.



    See, understand, learn, try, use efficient
    © Dr.Plch