Hi,
I am not understanding whether i should declare selling price in that sql table as money,decimal or int.. Which one is appropriate?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pravin MorePosted Nov 2, 2011, 1:03 AM
i told you it in example......
for e.g
moneyresult numericresult
2949.00 2949.8525
see,if you use money then you will get 2949.00 not 2949.8525 so its wrong.and if you loose .8 in every calculation then guess how much price will reduce if you are using that value in thousand number of time.......
Thanks, hopw i am able clear my point.
Pravin.
Nethra R SPosted Nov 2, 2011, 2:26 AM
Nethra R SPosted Nov 2, 2011, 12:27 AM
Thanks for the reply. If you can further explain how it can cause problem further i will be grateful
Pravin MorePosted Nov 2, 2011, 12:21 AM
int is not proper and dont use money also it is not perfect type to hold price, use decimal for price its perfect.
money and decimal result will be same till decimal point only,so money is not good for further calculations.
for e.g
moneyresult numericresult
2949.00 2949.8525
So, use decimal only.
Thanks,
Pravin.