• This behaviour is due to data type precedence.

    (@v1 / @v2 ) * @v3 will return smallmoney

    ((@v1 * 1.0) / @v2 ) * @v3 will return numeric

    This can be demonstrated like this:

    DECLARE @v1 SMALLMONEY = 1400.05,

    @v2 SMALLMONEY = 4232.33;

    SELECT @v1 / @v2 AS Val INTO TestTable1

    SELECT @v1 / @v2 * 1.0 AS Val INTO TestTable2

    EXEC sp_help TestTable1

    EXEC sp_help TestTable2

    DROP TABLE TestTable1

    DROP TABLE TestTable2

    And you will see the following:

    TestTable1

    Name - Val

    Type - smallmoney

    Length - 4

    Precision - 10

    Scale - 4

    TestTable 2

    Name - Val

    Type - numeric

    Length - 9

    Precision - 13

    Scale - 5

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]