首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

ORA-00933:SQL下令未正确结束

2012-12-19 
ORA-00933:SQL命令未正确结束点击右边红色标题查看本文完整版:ORA-00933:SQL命令未正确结束GROUP BY 在SQL

ORA-00933:SQL命令未正确结束
点击右边红色标题查看本文完整版:ORA-00933:SQL命令未正确结束

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的语法格式



------解决方法--------------------

SQL code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBHfrom aawhere nm like '%ph%'  GROUP BY BH,NM
------解决方法--------------------
SQL code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBH from aa where nm like '%ph%'GROUP BY BH,NM
    

热点排行