Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
samir.first
Starting Member
34 Posts |
Posted - 2014-04-26 : 04:03:02
|
SELECT ItemID,CurrentQuantity ,ComputedCurrentQuantitySUM(AddQuantity -ExQuantity ) OVER ( PARTITION BY ItemID ORDER BY FullDate ROWS UNBOUNDED PRECEDING) FROM SC_ItemsCurrentValues all data type is float CurrentQuantity is value insert and ComputedCurrentQuantity is recalculate this value the Result is CurrentQuantity ComputedCurrentQuantity60.62 60.62but when add column CurrentQuantity - ComputedCurrentQuantitythe Result is CurrentQuantity ComputedCurrentQuantity Deferent60.62 60.62 -9.09494701772928E-13Please I need Solved it |
|
nagino
Yak Posting Veteran
75 Posts |
Posted - 2014-04-27 : 20:15:18
|
by designFloat type is floating-point numberuse Decimal type-------------------------------------From JapanSorry, my English ability is limited. |
|
|
|
|
|