谢谢 彭老师 里面不只多置换资金一个类别我想所有类别都反映出来可以吗
看来我要加强学习了
select "土建" as 类别,项目编号,单位名称,应付现金,应付承兑,已付现金,已付承兑 from [土建$A:K] where 单位名称 is not null union all select "安装" as 类别,项目编号,单位名称,应付现金,应付承兑,已付现金,已付承兑 from [安装$A:K] where 单位名称 is not null union all select "其他费用" as 类别,项目编号,单位名称,应付现金,应付承兑,已付现金,已付承兑 from [其他费用$A:K] where 单位名称 is not null union all select "设备材料" as 类别,"18",单位名称,应付现金,应付承兑,已付现金,已付承兑 from [设备材料18$A:K] where 单位名称 is not null union all select "设备材料" as 类别,"19",单位名称,应付现金,应付承兑,已付现金,已付承兑 from [设备材料19$A:K] where 单位名称 is not null union all select "设备材料" as 类别,"21",单位名称,应付现金,应付承兑,已付现金,已付承兑 from [设备材料21$A:K] where 单位名称 is not null union all select "置换资金" as 类别,编号,单位名称,0,0,合计 as 已付现金,0 as 已付承兑 from [i:\已付款明细`.`资金实际使用明细表(月累计)$B:L] where 类别="置换资金" and 付款方式="现金" union all select "置换资金" as 类别,编号,单位名称,0,0,0,合计 as 已付承兑 from [i:\已付款明细`.`资金实际使用明细表(月累计)$B:L] where 类别="置换资金" and 付款方式="承兑" select "利息收入" as 类别,编号,单位名称,0,0,合计 as 已付现金,0 as 已付承兑 from i:\已付款明细`.`资金实际使用明细表(月累计)$B:L] where 类别="利息收入" and 付款方式="现金" union all select "利息收入" as 类别,编号,单位名称,0,0,0,合计 as 已付承兑 from [i:\已付款明细`.`资金实际使用明细表(月累计)$B:L] where 类别="利息收入" and 付款方式="承兑"select "其他费用(手续费)" as 类别,编号,单位名称,0,0,合计 as 已付现金,0 as 已付承兑 from i:\已付款明细`.`资金实际使用明细表(月累计)$B:L] where 类别="其他费用(手续费)" and 付款方式="现金" union all select "其他费用(手续费)" as 类别,编号,单位名称,0,0,0,合计 as 已付承兑 from [i:\已付款明细`.`资金实际使用明细表(月累计)$B:L] where 类别="其他费用(手续费)" and 付款方式="承兑"
是这样吗 怎么不行啊
[ 本帖最后由 天道酬勤y 于 2011-2-8 23:03 编辑 ] |