• This script demonstrates some problem with implicit conversion:

    declare @v-2 varchar(30)

    ,@f float

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

    set @f = 1.12

    set @v-2 = @f

    select @v-2

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

    set @f = 123456.12

    set @v-2 = @f

    select @v-2

    -- worst and worst

    set @f = 12345677.12

    set @v-2 = @f

    select @v-2

    -- correct solution

    set @f = 12345677.12

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

    select @v-2