Author |
Topic |
programer
Posting Yak Master
221 Posts |
Posted - 2011-05-17 : 16:58:04
|
Hi,I would like to save this number: 15.9, not 15,9.I used numeric(18,2) and decimal (18,2), but not works. |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2011-05-17 : 17:00:50
|
decimal, float should work.. just use the right precision..Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
programer
Posting Yak Master
221 Posts |
Posted - 2011-05-17 : 17:15:43
|
quote: Originally posted by dinakar decimal, float should work.. just use the right precision..Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/
Yes, but I can not save 15.6. I need to save the number with a dot. |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2011-05-17 : 17:21:13
|
have you tried?what is the error you get?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
programer
Posting Yak Master
221 Posts |
Posted - 2011-05-17 : 17:25:55
|
quote: Originally posted by dinakar have you tried?what is the error you get?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/
Invalid value for cell(row 7, column 5The changed value in this cell was not recognized as valid..Net Framework Data Type: DecimalError Message: Input string was not in a correct format. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
programer
Posting Yak Master
221 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
programer
Posting Yak Master
221 Posts |
Posted - 2011-05-17 : 19:12:25
|
quote: Originally posted by tkizer Yes it does work. That's why I posted the code for it. Try it yourself in Management Studio.The error you are getting appears to be from your application and not from T-SQL. Since 15.9 fits perfectly into decimal(3,1) as I've shown you, you'll need to fix up your code as this is not a SQL problem.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
I tried Management Studio but not works.Do you tried it?Problem is, since the data are not stored in the form of a dot.The data in the column can be saved by a comma. This is not good. |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2011-05-17 : 19:14:14
|
is this a new table that you are creating or do you already have a table with data in the X,Y format? And whats the format of your input from the front end?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
programer
Posting Yak Master
221 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
programer
Posting Yak Master
221 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
programer
Posting Yak Master
221 Posts |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2011-05-17 : 19:44:19
|
its possibly due to your locale settings.. need to look this up..Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2011-05-17 : 20:00:11
|
windows locale settings - control panel > region and language > Advance settings .. Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
|