--希望解决了楼主的问题selectbm,sum(casewhento_char(time,'MM')='01'thenfzelse0end)1月份fz合计,sum(casewhento_char(time,'MM')='02'thenfzelse0end)2月份fz合计,sum(casewhento_char(time,'MM')='03'thenfzelse0end)3月份fz合计,sum(casewhento_char(time,'MM')='04'thenfzelse0end)4月份fz合计,sum(casewhento_char(time,'MM')='05'thenfzelse0end)5月份fz合计,sum(casewhento_char(time,'MM')='06'thenfzelse0end)6月份fz合计,sum(casewhento_char(time,'MM')='07'thenfzelse0end)7月份fz合计,sum(casewhento_char(time,'MM')='08'thenfzelse0end)8月份fz合计,sum(casewhento_char(time,'MM')='09'thenfzelse0end)9月份fz合计,sum(casewhento_char(time,'MM')='10'thenfzelse0end)10月份fz合计,sum(casewhento_char(time,'MM')='11'thenfzelse0end)11月份fz合计,sum(casewhento_char(time,'MM')='12'thenfzelse0end)12月份fz合计frombmfzgroupbybm
阅读全文 >