convert float into varchar in SQL server without scientific notation

前端 未结 13 1394
被撕碎了的回忆
被撕碎了的回忆 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:24

    This is not relevant to this particular case because of the decimals, but may help people who google the heading. Integer fields convert fine to varchars, but floats change to scientific notation. A very quick way to change a float quickly if you do not have decimals is therefore to change the field first to an integer and then change it to a varchar.

提交回复
热议问题