http://blog.csdn.net/coleling/article/details/6406904
参考这篇文章你可以看一下乘法时的结果精度是如何确定的解决方法,如果scraprate Decimal(28,10)可以不需要这么高的精度可以降低,如
[code=sql][/DROP TABLE #tmp
Create Table #tmp(
Ration Decimal(28,10) null
,convertfirst Decimal(28,10) null
,scraprate Decimal(10,9) null
)
Insert Into #tmp (Ration ,convertfirst ,scraprate ) values (0.0033 , 1000 , 0 )select Ration/ convertfirst * ( 1 + ISNULL( scraprate , 0 ) )
from #tmpcode]
参考这篇文章你可以看一下乘法时的结果精度是如何确定的解决方法,如果scraprate Decimal(28,10)可以不需要这么高的精度可以降低,如
[code=sql][/DROP TABLE #tmp
Create Table #tmp(
Ration Decimal(28,10) null
,convertfirst Decimal(28,10) null
,scraprate Decimal(10,9) null
)
Insert Into #tmp (Ration ,convertfirst ,scraprate ) values (0.0033 , 1000 , 0 )select Ration/ convertfirst * ( 1 + ISNULL( scraprate , 0 ) )
from #tmpcode]
解决方案 »
- 如何接收自定义函数返回的表
- 高手聚会,这问题有几种解决方法(日期格式转换)。
- 深入SQL SERVER 2000的内存管理机制(翻译)
- 求救!数据库 每天被定时创建触发器。
- 请问存储过程里面怎么用表变量或临时表?
- 请问在SQL2000下,怎么输入和显示特殊数学符号
- 一个表里面由多个个用户名,每个用户名也有多个记录,但是每个记录的记录时间是不一样的,问题就是要查找这样的记录
- 存储过程传递中文字符串的问题
- 请教,如何使用 SQL Server 2000的事件查看器呢?
- 操作系统WIN2000,SQLSERVER7,计算机名称改变后,SQLSERVER不能启动,请问如何解决
- 怎样将补缺少的行数据
- 请教数据自动补零的计算列公式
Create Table #tmp(
Ration Decimal(28,10) null
,convertfirst Decimal(28,10) null
,scraprate Decimal(10,9) null
)
Insert Into #tmp (Ration ,convertfirst ,scraprate ) values (0.0033 , 1000 , 0 )select Ration/ convertfirst * ( 1 + ISNULL( scraprate , 0 ) )
from #tmp