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 |
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2002-06-27 : 12:29:55
|
| How can I change the statement below to round 5 places instead of just taking the first 5 characters?select left(avg(ship_wt),5) as avg1 from dbo.ship_FTMThanks!Lane |
|
|
VyasKN
SQL Server MVP & SQLTeam MVY
313 Posts |
Posted - 2002-06-27 : 12:33:39
|
| Try something like this:select CAST(avg(ship_wt) AS numeric(10, 5)) as avg1 from dbo.ship_FTM --HTH,Vyashttp://vyaskn.tripod.com |
 |
|
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2002-06-27 : 13:09:36
|
| Perfect, thanks!Lane |
 |
|
|
VyasKN
SQL Server MVP & SQLTeam MVY
313 Posts |
Posted - 2002-06-27 : 13:15:06
|
| Make sure you adjust "numeric(10, 5)" as needed. I don't know your data, so that was just an example. Specify a size that can accommodate ship_wt.--HTH,Vyashttp://vyaskn.tripod.com |
 |
|
|
|
|
|