I have the following
select 'dbr.title','Summary'
select 'dbr.calc','[percentrn]','[r/n]/[r/n.sum]*100'
select 'dbr.colstyle','[percentrn]','%.2f %'
select 'dbr.calc','[percentbc]','[Base_cost]/[Base_cost.sum]*100'
select 'dbr.colstyle','[percentbc]','%.2f %'
select 'dbr.sum','r/n','Base_cost'
select 'dbr.avg','r/n','Base_cost'
select 'dbr.summary_options','skip_single_line_summary'
select
Market,
[r/n],
[percentrn]=null,
[Base_cost],
[percentbc]=null
from (
select
Market,
sum(room_nights) as [r/n],
sum(base_cost) as [Base_cost]
from @temp_production
group by Market
) a
order by Market
and the result shows
Summary
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Unknown column reference: r/n.sum
Unknown column reference: Base_cost.sum
Wonder where is going wrong