日期:2014-05-17  浏览次数:20574 次

报错!报错!



declare @i Decimal(10,2), @j Decimal(10,2)
set @i = 12.32223
set @j=5.110
select (@i+@j)%@j

--换成numeric(10,2)也不行




ps.在我的机器上sql server2005 好使,在朋友的机器上2000 和 2005都不好使!
求助~~
ta su ke te ku re ~~~
------解决方案--------------------
2012无压力
declare @i Decimal(10,2), @j Decimal(10,2)
set @i = 12.32223
set @j=5.110
select (@i+@j)%@j

/*

---------------------------------------
2.10

*/

------解决方案--------------------
我的2008r2也没问题,没报错:
declare @i Decimal(10,2), @j Decimal(10,2)
set @i = 12.32223
set @j=5.110
select (@i+@j)%@j
 
/*
2.10
*/

------解决方案--------------------
2000的表示壓力很大,報錯,