mssql convert varchar to float

后端 未结 3 465
北恋
北恋 2020-12-20 12:00

I have a field value productlength of 0.123. This is from a view and has a data type of varchar.

I need to convert it to a float or numeric value so as o perform mat

3条回答
  •  猫巷女王i
    2020-12-20 12:14

    Use

    Try_convert(float,[Value])
    

    See https://raresql.com/2013/04/26/sql-server-how-to-convert-varchar-to-float/

提交回复
热议问题