GROUP BY 在SQL Worksheek中运行出错,
select *
from aa
where nm like '%ph%' 可以正常运行显示
但用
select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBH
from aa
GROUP BY BH,NM
where nm like '%ph%' 提示ORA-00933:SQL命令未正确结束,我的语句有问题还是ORACLE有别于SQL SERVER 2000的语法格式
------解决方法--------------------------------------------------------
select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBHfrom aawhere nm like '%ph%' GROUP BY BH,NM
------解决方法--------------------------------------------------------
select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBH from aa where nm like '%ph%'GROUP BY BH,NM