Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi friend

I have a doubt of choosing the data type for a employee salary like Rs of 26699.65 what data type can i use for that
Is decimal , double , float , money

help me please

thanks in advance :-)
Posted
Comments
RedDk 29-Jul-13 13:40pm    
In TSQL ... either money (8 bytes) or smallmoney (4 bytes ... -214,748.3648 to 214,748.3647). Dedicated data type, accurate to 10000th of the unit used.

http://msdn.microsoft.com/en-us/library/ms188688(v=sql.105).aspx

1 solution

I think u can use decimal or money data type..
 
Share this answer
 
Comments
Sureshfrompalladam 29-Jul-13 3:12am    
if i use decimal means it automatically convert into double and show me the error as
cannot store double into decimal ..
ErBhati 29-Jul-13 5:40am    
convert ur value to decimal

like decimal employee salary=convert.todecimal(textboox.text);
ErBhati 31-Jul-13 8:19am    
or salary=convert.todouble(textbox.text);
Sureshfrompalladam 6-Aug-13 1:08am    
thank you so much for your valuable reply ....
its converted double only at the run time so no problem in decimal values

ErBhati 6-Aug-13 5:33am    
mark as answer for this....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900