con.execute "update Temp_Report"&userid&" set datal = total, h = n from (select count(*) n, sum(isnull(int2,0)) total, w from Temp_Report"&userid&" group by w) as a where Temp_Report"&userid&".w = a.w"
其中不明白的地方是:
from (select count(*) n, sum(isnull(int2,0)) total //from 后边不是应该接的是从哪个表吗? 但这个后边应该表,而是列吧?另外,n , total 是将count 和 sum(isnull(int2,0))值保持到 n 和total吗?