SELECT ltrim(str((convert (dec (15,2),dbsize) + convert (dec (15,2),logsize)) * 8192 / 1048576,15,2))+'MB' database_size
from (
select sum(convert(bigint,case when status & 64 = 0 then size else 0 end)) dbsize
, sum(convert(bigint,case when status & 64 <> 0 then size else 0 end)) logsize
from [IPVA_S0400_Nike_SUB_2012].dbo.sysfiles
) a