November 1, 2011 at 12:39 am
Hi Frd's,
I have a table variable column like this
Sum_percentage
-------------
3495.91170000
514498.97890000
36325.58660000
3495.91170000
514498.97890000
32416.23920000
...nearly 1 million records
What i need to be is load it like this
Sum_percentage
-------------
3495.91
5144.98
3632.58
3495.91
5144.98
3241.62
...nearly 1 million records
Need help? Help us help you.
November 1, 2011 at 3:53 am
This was removed by the editor as SPAM
November 1, 2011 at 3:57 am
have a look at the round function and divide by a factor of ten to move the decimal.
though the example you have given show incosistent behaviour where some values are being rounded, some are moving the decimal point One or Two places
and some are giving completly different numbers;
eg. 36325.58660000 --> 3632.58
I am not sure if this is intentional or just a typo?
November 1, 2011 at 4:18 am
Believe this to be a duplicate post
http://www.sqlservercentral.com/Forums/Topic1197945-391-1.aspx
November 1, 2011 at 9:03 am
select CAST(Sum_percentage as money) from tablename
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply