我有这个查询来计算帐户总数,但我不断收到错误语法的错误消息。
还有另一种方法来编写此查询吗?
string all = "SELECT YYMM, Count(Key) AS CountOfKey FROM tbl_WR WHERE
(((Right(Year([purchase date]),2) + right('0'+rtrim(month([purchase date])),2))
=[yymm])) GROUP BY YYMM HAVING YYMM>=1101";
感谢您的帮助!
答案 0 :(得分:0)
更改
Count(Key)
到
Count([Key])