|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
calculations sql server versus vb.netI had a calculation 999999999999.99 * (7.00 /100 / 12) * 6 sql server gives 34999997999.99965000002 vb.net gives 34999999999.999649 (tried in debugger) I had breakdown the problem to resolve as below. could any of you throw some light to resolve this. Calculation 7.00 / 100 sql server .070000 vb.net 0.07 7.00 / 100/ 12 sql server .005833333 vb.net 0.0058333333333333336 (7.00 /100 / 12) * 6 sql server .034999998 vb.net 0.035 999999999999.99 * (7.00 /100 / 12) sql server 5833332999.99994166667 vb.net 5833333333.3332748 999999999999.99 * (7.00 /100 / 12) * 6 sql server 34999997999.99965000002 vb.net 34999999999.999649 Thanks Rajesh. > I had a calculation 999999999999.99 * (7.00 /100 / 12) * 6 Strange. What were the data types that you used in SQL & VB?> > sql server gives 34999997999.99965000002 > vb.net gives 34999999999.999649 (tried in debugger) -- Peace & happy computing, Mike Labosh, MCSD "Mr. McKittrick, after very careful consideration, I have come to the conclusion that this new system SUCKS." -- General Barringer, "War Games" |
|||||||||||||||||||||||