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 |
|
chedderslam
Posting Yak Master
223 Posts |
Posted - 2009-07-02 : 13:37:52
|
| update tableset table.value = ( table.value / 12 )datatype is smallint. Will it round down to nearest whole number automatically or do I need to apply some function? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-02 : 13:44:38
|
| it will undergo truncation and gives only integer part of result |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-02 : 13:53:00
|
| see this alsohttp://sqlblogcasts.com/blogs/madhivanan/archive/2008/01/16/beware-of-implicit-conversions.aspx |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-02 : 13:57:39
|
| also try thisupdate tableset table.value =round(( table.value * 1.0 / 12 ),0) |
 |
|
|
|
|
|