• Jeff,

    are you sure the code you posted works? I tried it out of curiosity, and I'm getting some strange results... e.g. for number 99, depending on how I enter it, result is either 1 or -2.

    DECLARE @Places INT

     SELECT @Places = FLOOR(LOG10(REVERSE(ABS(cast (99 as float))+1)))+1

    SELECT @places

    -----------

              1

    (1 row(s) affected)

    DECLARE @Places INT

     SELECT @Places = FLOOR(LOG10(REVERSE(ABS(99.0000)+1)))+1

    SELECT @places

    -----------

             -2

    (1 row(s) affected)