本文介绍了正数和负数的前导零到小数数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个SQL服务器表,其中一列需要按如下格式设置:
我的列名是:Diff_Adj
此列中的正数和负数---
数据看起来像这样:
15.00和-15.00
我需要删除小数点,所以数据看起来像这样:
> 1500和-1500
然后我需要向其添加前导零,以便所有金额都在10尾长内,包括负金额的负号
0000001500
-000001500
请帮助
Leading Zeros to Decimal Data Type |
Hello I have a SQL server table with one column that I need to format as follows: My column name is: Diff_Adj Positive and Negative amounts in this column--- Data looks like this: 15.00 and -15.00 I need to remove decimal point so data will look like this: 1500 and -1500 Then I need to add leading zeros to them so all the amounts are in 10 dogits long including the negative sign for negative amounts 0000001500 -000001500 PLEASE HELP |
推荐答案
感谢您的帖子!我建议将您的问题发布到 MSDN 论坛首页> SQL Server > 数据挖掘位于此处: http://social.msdn.microsoft.com/Forums/zh-CN/sqldatamining/threads/.
Thank you for your post! I would suggest posting your question in one of the MSDN > Forums Home > SQL Server > Data Mining located here: http://social.msdn.microsoft.com/Forums/en-US/sqldatamining/threads/.
祝您有美好的一天!
这篇关于正数和负数的前导零到小数数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!