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 |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-06-01 : 07:01:14
|
| Hi I need a query to display a percentage of a total.i.e. select cast(100/150 as decimal(18,2)) should Display: 0.66but diplays 0.00Any idea how i change my code to display this?ThanksDavid |
|
|
bpgupta
Yak Posting Veteran
75 Posts |
Posted - 2007-06-01 : 07:36:34
|
| Try thisselect cast(100.00/150.00 as decimal(18,2)) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-01 : 08:23:00
|
| orselect cast(1.0*100/150 as decimal(18,2)) MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|