First of all (some background) - I know nothing about programming in anything except VB for Applications in Excel and a little SQL.
21 months ago my employer insisted in purchasing custom software I specified from a Chinese company with limited English skills. Today there is no end in sight. (Additionally, I am not certain he is using C++, but I believe it is a C language.) Last conference call w/screen sharing he opened his code and I was able to read it enough to find some errors in his calculations.
I have questioned him why on every calculation he multiplies by .01 and then multiplies by 100. His answer to this question was "multiply by *.01 then multiply by *100 is to make the results to two decimal places". Which seems absurd to me.
Doesn't the 2 in numeric(9,2) mean truncate to two decimal places?Code:@MinPer=(select top 1 cast(MinPer as numeric(9,2))*0.01/(case when UOM='sec' then 60 else 1 end)*100