|
[11]/b.[11],4) as numeric(5,4)), cast(round(a.[12]/b.[12],4) as numeric(5,4)) from (select * from #tempall where 项目='1.材料总金额') as b, (select * from #tempall where 项目='3.生产部金额') as a union all SELECT '9.'+[项目] ,[一月] ,[二月] ,[三月] ,[四月] ,[五月] ,[六月] ,[七月] ,[八月] ,[九月] ,[十月] ,[十一月] ,[十二月] FROM [OA].[dbo].[超领目标] where 年份=@year drop table #tmp drop table #tempall end

?
|