Convert Numeric value to Varchar

后端 未结 2 1724
没有蜡笔的小新
没有蜡笔的小新 2021-02-12 13:57

i m trying to fetch the record using append some alphabt in my numeric column. but i m getting error, i tried with cast and convert function.

for exmaple



        
2条回答
  •  长情又很酷
    2021-02-12 14:46

    First convert the numeric value then add the 'S':

     select convert(varchar(10),StandardCost) +'S'
     from DimProduct where ProductKey = 212
    

提交回复
热议问题