Home > database >  [for] used to transfer Money type Decimal type, SUM value is different, the Decimal 0.05 more, how t
[for] used to transfer Money type Decimal type, SUM value is different, the Decimal 0.05 more, how t

Time:09-26

After insert Money type of data in a Decimal type column, both SUM value is not the same as to how to solve?

CodePudding user response:

I think you can than on the detail data, first look at what assets card data difference, generally use a decimal value,

CodePudding user response:

Data accuracy (decimal) caused by different

CodePudding user response:

Certainly no sum calculation

You use the original table and test table according to the associated id, compare if there is a value difference after the October depreciation accumulated depreciation

The t select * from dbo
On left join DepreciationCount2_11 d t.i d=d.i d
After October where t. depreciation accumulated depreciation & lt;> D. after the October depreciation accumulated depreciation

CodePudding user response:

 declare @ m money, @ d a decimal (16, 2) 
The set @ m=1.258
The set @ d=@ m
Select @ m, @ d


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1.258 1.26

Line (1) affected
  • Related