Q:

How to add decimal to int?

How can I add a decimal to an INT.
for example with the data below:
12452 into 124.52
500 into 5.00
1659865 into 16598.65
I have try this query but this is only for decimal :
select convert(decimal(10,2),sum(balance)) as Balance   
from member

A:

Just divide by 100:
select convert(decimal(10,2),sum(balance)/100.0) as Balance   
from member

Converting doesn't change the actual value* - it just changes the data type, so 500 (int) becomes 500.00 (decimal(10,2))
*Unless the conversion itself changes the value due to a decrease in scale or precision (e.g. converting 1234.56 to decimal(5,1) would result in a value of 1234.6)

