convert float into varchar in SQL server without scientific notation

前端 未结 13 1427
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 13:46

convert float into varchar in SQL server without scientific notation and trimming decimals.

for Ex:

i have float value 1000.2324422, then it

13条回答
  •  余生分开走
    2020-12-01 14:04

    STR function works nice. I had float coming back after doing some calculations and needed to change to VARCHAR, but was getting scientific notation randonly as well. I made this transformation after all the calcs

     ltrim(rtrim(str(someField)))
    

提交回复
热议问题