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 |
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-04-17 : 02:46:18
|
| Hi,I need to display the value of a certain varible rounded to two digits after decimal.For example :value of a is 1346.8500I need to get the value of a as 1346.85Please help me |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-17 : 02:49:24
|
| What is datatype of a? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-17 : 02:51:25
|
| SELECT CAST(a as decimal (20,2)) |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-04-17 : 02:54:07
|
quote: Originally posted by visakh16 What is datatype of a?
Numeric(19,4).Ok thanks, visakh i will do it as cast( a as numeric(19,2)).Is it ok???? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-17 : 03:02:47
|
quote: Originally posted by raky
quote: Originally posted by visakh16 What is datatype of a?
Numeric(19,4).Ok thanks, visakh i will do it as cast( a as numeric(19,2)).Is it ok????
Thats fine |
 |
|
|
|
|
|