• Just out of interest, I tested the rounding of every float value in the sequence 0.65, 1.65, 2.65, etc up to 99.65 using the following code:

    declare

    @a float

    ,@x tinyint;

    declare

    @tbl table

    (

    col1 tinyint

    ,col2 decimal(4,1)

    );

    select

    @x=0;

    while @x<=100

    begin

    select

    @a=@x+0.65;

    insert into

    @tbl

    select

    @a

    ,round(@a,1);

    select

    @x=@x+1;

    end;

    select

    col1

    ,col2

    from

    @tbl;

    I found that 51 rounded down and 49 rounded up, which sounds fairly random except that every number from 4.65 to 15.65 rounds up, as does every number from 64.65 to 99.65.

    There must be some rule that governs this, but I think the best lesson is to always treat float values with caution.