
July 19th, 2006, 03:04 AM
|
|
Registered User
|
|
Join Date: Jul 2006
Posts: 3
Time spent in forums: 36 m 35 sec
Reputation Power: 0
|
|
Be carefull what you do !!!
Here is something that I have found out that may help all of us.
When you compute something using expression which calculate something using different types of data (smallint, decimal, integer...), you all should be very carefull about the order of the variables used in the expression.
Here is the example, if you want to get a decimal good value :
A smallint
B smallint
C decimal
D integer
Rez decimal
....
Rez = A / B * C * D
....
this gives you wrong value because you have A / B first.
Do this instead to get a good result :
Rez = A * C * D / B
Now the result is valid .
Thanks for reading this ... and may the force be with you  ))
|