ORA-00918:未定义确定列
来源:互联网 发布:pcb绘图软件中文版 编辑:程序博客网 时间:2024/05/20 10:54
今天在写这个sql的时候报了这个错误,sql如下:
1 select spNumber,userId,glcPassWord,remoteUserId,remotePassWord,serviceNumber,url,mobile,privateLevel,
2 priorityLevel,flowNumber,subSpFlag ,pseudoFlag ,serviceType ,locationStyle,spSinoName ,activeFlag ,
3 delineAtion ,spRange, spRightId ,xyFlag ,xyDisplay, maxNumber ,stateareaCode ,connectflag,locationtype,
4 sagflag,privauthtype,sagid,pushaddr,pushurl,wapurl,bizcustfeetype,bizcustisfree,bizid,createdate,validdate,
5 neednotify from (select a.*,rownum r from
6 (select * from glc_sp_info s,topmcorporation t,glc_service_info se
7 where 1=1 and s.sprightid=t.corporationid and s.spnumber=se.spnumber order by s.spNumber desc) a where rownum <= 12) where r>0
出现该问题的原因:
主要是第七行的(select * 星号 作怪,因为后面关联了3个表,而这三个表中glc_service_info 和glc_sp_info表中都存在spnumber,所以主要原因是出现重复字段。你要把语句改成一下就ok了
select spNumber,userId,glcPassWord,remoteUserId,remotePassWord,serviceNumber,url,mobile,privateLevel,
priorityLevel,flowNumber,subSpFlag ,pseudoFlag ,serviceType ,locationStyle,spSinoName ,activeFlag ,
delineAtion ,spRange, spRightId ,xyFlag ,xyDisplay, maxNumber ,stateareaCode ,connectflag,locationtype,
sagflag,privauthtype,sagid,pushaddr,pushurl,wapurl,bizcustfeetype,bizcustisfree,bizid,createdate,validdate,
neednotify from (select a.*,rownum r from
(select s.spNumber,s.userId,s.glcPassWord,s.remoteUserId,s.remotePassWord,s.serviceNumber,s.url,s.mobile,s.privateLevel,
s.priorityLevel,s.flowNumber,s.subSpFlag ,s.pseudoFlag ,s.serviceType ,s.locationStyle,s.spSinoName ,s.activeFlag ,
s.delineAtion ,s.spRange, s.spRightId ,s.xyFlag ,s.xyDisplay, s.maxNumber ,s.stateareaCode ,s.connectflag,s.locationtype,
s.sagflag,s.privauthtype,s.sagid,s.pushaddr,s.pushurl,s.wapurl,s.bizcustfeetype,s.bizcustisfree,s.bizid,t.createdate,t.validdate,
se.neednotify from glc_sp_info s,topmcorporation t,glc_service_info se
where 1=1 and s.sprightid=t.corporationid and s.spnumber=se.spnumber order by s.spNumber desc) a where rownum <= 12) where r>0
- ORA-00918:未定义确定列
- ORA-08002: SEQUENCES **.CURRVAL 未定义
- row_.* 处出现 “未定义列”
- ORA-00918:未明确定义列
- ORA-00918:未明确定义列
- ORA-00918: 未明确定义列
- ORA-00918:未明确定义列解决
- ora-00918:未明确定义列
- ORA-00918 未明确定义列
- ORA-00918:未明确定义列
- ORA-00918: 未明确定义列
- SQL:Error,ORA-00918未明确定义列
- java.sql.SQLException: ORA-00918: 未明确定义列
- mybatis中语句块报错, ORA-00918: 未明确定义列
- java.sql.SQLException: ORA-00918: 未明确定义列
- 数据库查询 报错 *****ORA-00918: 未明确定义列
- ORA-00918: column ambiguously defined 未明确定义列
- java.sql.SQLException: ORA-00918: 未明确定义列ORA-00918
- hdoj2006
- iOS小团队创业经验分享
- 八款开源Android游戏引擎
- 打发士大夫
- hdoj2007
- ORA-00918:未定义确定列
- ruby控制语句和循环语句
- hdoj2008
- c++中多态函数以及函数重载,覆盖,遮蔽(隐藏)的区别
- 11个有用的移动网页开发App和HTML5框架
- java 反射初步
- Java Toolkit得到当前屏幕分辨率(查询本机操作系统)
- Spring 管理bean的生命周期
- iphone之解决NSURLConnection timeout失效问题