• This script demonstrates some problem with implicit conversion:

    declare @v varchar(30)

    ,@f float

    -- here you think it is all right and it is

    set @f = 1.12

    set @v = @f

    select @v

    -- here you think it is all right, but you get the wrong result

    set @f = 123456.12

    set @v = @f

    select @v

    -- worst and worst

    set @f = 12345677.12

    set @v = @f

    select @v

    -- correct solution

    set @f = 12345677.12

    set @v = CAST(@f AS DECIMAL(16,2))

    select @v