当GROUP带字段函数时,不行;为什么数据窗口不能编辑GROUP BY呢? 这样的SQL数据窗口如何创建 ,急啊!!!
SELECT Cstr(year(t_dzshd.shrq))+'-'+Cstr(month(t_dzshd.shrq)) as nian,
t_dzshd.yltypeid,
t_dzshd.mcgg,
sum(iif(isnull(sl),0,sl)) as sumsl,
sum(iif(isnull(je),0,je)) as sumje
FROM t_dzshd
WHERE t_dzshd.flag = 'd'
GROUP BY Cstr(year(t_dzshd.shrq))+'-'+Cstr(month(t_dzshd.shrq)),
t_dzshd.yltypeid,
t_dzshd.mcgg
ORDER BY Cstr(year(t_dzshd.shrq))+'-'+Cstr(month(t_dzshd.shrq)) ASC,
t_dzshd.yltypeid ASC,
t_dzshd.mcgg ASC;
[解决办法]
[解决办法]
先随便创—W,再Design - Convert To Syntax 修改sql