Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
csecharith
Starting Member
21 Posts |
Posted - 2007-10-30 : 23:39:50
|
| Hi,The default number of decimal points for 'money' data type is 4. Can I change it as 6?Eg 120.123456Thanks! |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-10-30 : 23:44:16
|
I don't think so. use decimal() instead KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
csecharith
Starting Member
21 Posts |
Posted - 2007-10-30 : 23:47:57
|
quote: Originally posted by khtan I don't think so. use decimal() instead KH[spoiler]Time is always against us[/spoiler]
Can I use decimal() datatype for that?I used decimal(18,0) but it doesn't allow me to add decimal points. How can I change it to store decimal points?Thanks! |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-10-30 : 23:49:35
|
[code]decimal(18,6)[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-31 : 02:10:03
|
| or use numeric(18,6)MadhivananFailing to plan is Planning to fail |
 |
|
|
arorarahul.0688
Posting Yak Master
125 Posts |
Posted - 2007-10-31 : 08:38:32
|
| i dont think you can increase the length parameter of money typecolumn bt when u have to retrive the value of that column in a data type of higher length you can do ascreate table rr (a money)insert into rr values(12.12345)select * from rranswer is 12.1235bt when taking money as decimal we can do itselect convert(decimal(12,7),a) from rranswer is 12.1235000Rahul Arora MCA 07 BatchNCCE Israna, PanipatHRY, INDIA |
 |
|
|
csecharith
Starting Member
21 Posts |
Posted - 2007-11-01 : 04:42:43
|
quote: Originally posted by arorarahul.0688 i dont think you can increase the length parameter of money typecolumn bt when u have to retrive the value of that column in a data type of higher length you can do ascreate table rr (a money)insert into rr values(12.12345)select * from rranswer is 12.1235bt when taking money as decimal we can do itselect convert(decimal(12,7),a) from rranswer is 12.1235000Rahul Arora MCA 07 BatchNCCE Israna, PanipatHRY, INDIA
Thanks A lot |
 |
|
|
csecharith
Starting Member
21 Posts |
Posted - 2007-11-01 : 04:43:31
|
quote: Originally posted by khtan
decimal(18,6) KH[spoiler]Time is always against us[/spoiler]
Thanks A lot |
 |
|
|
|
|
|
|
|