do you want to get the SSize per each row?
If so, I think you have to store these 3 fields first in a temp table. Then use a cursor, or something like that,for your calculations to compute SSize per row.
If the SSize would get the total of these 3 fields, get first the sum for each of these fields. Placed it in integer variables, then proceed to your calculations. Try this
select @SSize1 = sum(SSize1), @SSize2 = sum(SSize2), @SSize3 = sum(SSize3)
from table_name
if @SSize3 <> 0 then
SSize = @SSize1 + (@SSize2/@SSize3)
else
SSize = @SSize1
end if
hope this would work on you
