cast or convert a float to nvarchar?

前端 未结 7 1321
醉话见心
醉话见心 2021-02-03 22:02

I need to select from one column of datatype float and insert it in another column as nvarchar.

I tried to cast it: cast([Column_Name] as nvarchar(50))

7条回答
  •  無奈伤痛
    2021-02-03 22:56

    For anyone willing to try a different method, they can use this:

    select FORMAT([Column_Name], '') from YourTable
    

    This will easily change any float value to nvarchar.

提交回复
热议问题