回复 楼主 chychychy
分类汇总吧这样,行吗?
程序代码:
select bmddm,sum(iif([物理]$xkkmzhmc,1,0)) as 物理,; sum(iif([化学]$xkkmzhmc,1,0)) as 化学,; sum(iif([生物]$xkkmzhmc,1,0)) as 生物,; sum(iif([政治]$xkkmzhmc,1,0)) as 政治,; sum(iif([历史]$xkkmzhmc,1,0)) as 历史,; sum(iif([地理]$xkkmzhmc,1,0)) as 地理 ; from 表2 group by bmddm union ; select [合计],; sum(iif([物理]$xkkmzhmc,1,0)) as 物理,; sum(iif([化学]$xkkmzhmc,1,0)) as 化学,; sum(iif([生物]$xkkmzhmc,1,0)) as 生物,; sum(iif([政治]$xkkmzhmc,1,0)) as 政治,; sum(iif([历史]$xkkmzhmc,1,0)) as 历史,; sum(iif([地理]$xkkmzhmc,1,0)) as 地理 ; from 表2 into cursor ls select ls browse
[此贴子已经被作者于2024-5-17 05:54编辑过]