如题:
语句1:
select m.mEmail,a.aAuditor from Members as m,taskApply as a where a.aAuditor=m.mName
语句2:
select count(*) from taskApply where aAuditor is not null group by aAuditor
试试这个select aAuditor,count(0),memail from taskApply left join members on members.mName=taskapply.aauditor where aAuditor is not null group by aAuditor,memail
如果有group by
你要查询的字段要么在group by 后面 ,要么在 聚合函数里面 就像你第二个语句中的count(*)
select m.mEmail,a.aAuditor,count(*) as val from Members as m,taskApply as a where a.aAuditor=m.mName
where aAuditor is not null group by m.mEmail,a.aAuditor
大致语句应该是这样的,没有调试过,按照这个方向去试一下吧!
两条语句中间加上 ; 分号
然后 readnext() 读下下一句