SQL Server转换数字 [英] SQL Server Convert a number

查看:167
本文介绍了SQL Server转换数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个号码:5.42418E + 15
如何将此号码转换为16位数字,如下所示:
4383452049412480?

I have this number: 5.42418E+15 How do I convert this number to a 16 digit number like this: 4383452049412480?

我在excel通过格式化这个列到数字,然后我选择1234格式,但我想要在Sql服务器中完成它。

I am doing it manually in excel by formatting that column to Number then I select 1234 format but I want this to be done in Sql server.

谢谢。

推荐答案

declare @F as float(53)
set @F = 6713073544159400

select @F
      6.7130735441594E+15

select cast( @F as decimal)
      6713073544159400

这篇关于SQL Server转换数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆