select fq,count(fq) as tt from order group by fq
下面的dingdan = ('"&dingdan&"')")括号什么意思?你去掉试试
set rs77=conn.execute("SELECT sum(fq) as cf FROM order GROUP BY cf where dingdan = '"&dingdan&"'")
这个问题曾经遇见过!一般的解决方法是:
select distinct (某字段),字段2,字段3... from 表
select count(*) from
(
select 字段 from 表
group by 字段
) as t