VFP问题,SQL语言:Group by子句缺少或无效
SELECTBorr_retu.xh,COUNT(Borr_retu.xh),Reader.bj,Reader.xm;FROM;tsgl_ku!reader;INNERJ...
SELECT Borr_retu.xh, COUNT(Borr_retu.xh), Reader.bj, Reader.xm;
FROM ;
tsgl_ku!reader ;
INNER JOIN tsgl_ku!borr_retu ;
ON Reader.xh = Borr_retu.xh;
WHERE ALLTRIM(STR(YEAR(Borr_retu.jsrq),4)) = '&nian';
AND ALLTRIM(STR(MONTH(Borr_retu.jsrq))) = '&yue';
GROUP BY Borr_retu.xh;
ORDER BY 2 DESC;
INTO CURSOR paihangbang
这是一个查询,运行之后就跳出来“Group by子句缺少或无效”的提示。弄了几个小时,也不知错在哪里,恳请大神指教! 展开
FROM ;
tsgl_ku!reader ;
INNER JOIN tsgl_ku!borr_retu ;
ON Reader.xh = Borr_retu.xh;
WHERE ALLTRIM(STR(YEAR(Borr_retu.jsrq),4)) = '&nian';
AND ALLTRIM(STR(MONTH(Borr_retu.jsrq))) = '&yue';
GROUP BY Borr_retu.xh;
ORDER BY 2 DESC;
INTO CURSOR paihangbang
这是一个查询,运行之后就跳出来“Group by子句缺少或无效”的提示。弄了几个小时,也不知错在哪里,恳请大神指教! 展开
2个回答
展开全部
SELECT Borr_retu.xh, COUNT(Borr_retu.xh), Reader.bj, Reader.xm;
FROM ;
tsgl_ku!reader ;
INNER JOIN tsgl_ku!borr_retu ;
ON Reader.xh = Borr_retu.xh;
WHERE ALLTRIM(STR(YEAR(Borr_retu.jsrq),4)) = '&nian';
AND ALLTRIM(STR(MONTH(Borr_retu.jsrq))) = '&yue';
GROUP BY Borr_retu.xh,Reader.bj, Reader.xm;
ORDER BY 2 DESC;
INTO CURSOR paihangbang
FROM ;
tsgl_ku!reader ;
INNER JOIN tsgl_ku!borr_retu ;
ON Reader.xh = Borr_retu.xh;
WHERE ALLTRIM(STR(YEAR(Borr_retu.jsrq),4)) = '&nian';
AND ALLTRIM(STR(MONTH(Borr_retu.jsrq))) = '&yue';
GROUP BY Borr_retu.xh,Reader.bj, Reader.xm;
ORDER BY 2 DESC;
INTO CURSOR paihangbang
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在运行这个查询语句之前 先
SET ENGINEBEHAVIOR 70
应该就可以了
SET ENGINEBEHAVIOR 70
应该就可以了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询