Home Forums SQL Server 7,2000 T-SQL Error converting data type nvarchar to float RE: Error converting data type nvarchar to float

  • I was just gonna ask if your numbers were always formatted like '15,28' with commas then you could use

    declare @string1 char(20), @string2 float

    set @string1 = '152,23'

    print @string1

    set @string2 = convert(float,replace(@string1,',','.'))

    print @string2