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 |
|
miked1978
Starting Member
25 Posts |
Posted - 2008-09-24 : 09:36:11
|
| I just need to round some of my fields to no decimal places. The data types are char.Here is my final select statement and I need to round the last 4 fields. Please helpselect tbAhdBhdstep3.*, tbAhdBhdstep3a.CsoAhead, tbAhdBhdstep3a.CsoBehind, tbAhdBhdstep3a.CsoSVc, tbAhdBhdstep3a.CsoCVcinto tbAhdBhdstep4from tbAhdBhdstep3, tbAhdBhdstep3awhere tbAhdBhdstep3.hull = tbAhdBhdstep3a.hull and tbAhdBhdstep3.Div = tbAhdBhdstep3a.Div |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-09-24 : 10:07:36
|
| Use cast(col as numeric(12,0))MadhivananFailing to plan is Planning to fail |
 |
|
|
miked1978
Starting Member
25 Posts |
Posted - 2008-09-24 : 10:55:34
|
quote: Originally posted by madhivanan Use cast(col as numeric(12,0))MadhivananFailing to plan is Planning to fail
Do I use an update statement? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-24 : 11:06:58
|
quote: Originally posted by miked1978
quote: Originally posted by madhivanan Use cast(col as numeric(12,0))MadhivananFailing to plan is Planning to fail
Do I use an update statement?
only if you want to keep rounded values in db. other wise you can round it always during retrieval in select query |
 |
|
|
|
|
|