java.sql.SQLException: ORA-01799: a column may not be outer-joined to a subquery
来源:互联网 发布:june软件 编辑:程序博客网 时间:2024/05/17 22:05
错误原因:
Oracle禁止在outer join后使用子查询,参考http://forums.oracle.com/forums/thread.jspa?threadID=945104&tstart=0
Presumably, Oracle has decided that the 9i behavior was incorrect-- you are doing an outer join to a subquery, which isn't allowed. The 9.2.0.1 parser didn't notice the error. Presumably, you're getting lucky and Oracle generates the correct output. But presumably the optimizer doesn't know how to handle this properly in all cases, so Oracle disallows it. The 10.2.0.4 behavior appears to be correct from Oracle's standpoint-- you'll need to refactor the code to avoid doing an outer join to a subquery.
翻译:据推测,Oracle 9i明白这种行为是错误的(你在outer join后使用子查询),但是9.2.0.1解析器没有提示这种错误,据推测,你非常幸运的生成了正确的输出.但是并不适用于所有情况.所以Oracle禁止这种操作.在10.2.0.4版本Oracle正确的拒绝这种操作,你应该重构你的代码来避免使用outer join后加入子查询.
参考2 http://www.oracle.com.cn/viewthread.php?tid=34336
ERROR at line 4:
ORA-01799: a column may not be outer-joined to a subquery
As a work around, you can use an inline view to achieve the desired effect:
SELECT E.LNAME
FROM EMPLOYEE E,
(SELECT DEPT_ID FROM DEPARTMENT WHERE NAME = 'ACCOUNTING') V
WHERE E.DEPT_ID (+) = V.DEPT_ID;
- java.sql.SQLException: ORA-01799: a column may not be outer-joined to a subquery
- a predicate may reference only one outer-joined table
- java.sql.SQLException: ResultSet may only be accessed in a forward direction.报错
- java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection
- java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection
- java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
- java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
- ORA-01502& ORA-14086: a partitioned index may not be rebuilt as a whole
- 数据库切换oracle to mysql的坑--Caused by: java.sql.SQLException: Column '' not found.
- MySQL错误——java.sql.SQLException: Incorrect decimal value: \'\' for column \'sys_offset_seq\' a
- new types may not be defined in a return type
- 【c3p0】 java.sql.SQLException: An attempt by a client to checkout a Connection...
- java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
- java.sql.SQLException: An attempt by a client to checkout a Connection has timed out
- This may be due to a corruption of the heap
- This may be due to a corruption of the heap!
- java.sql.SQLException: ORA-01747: user.table.column, table.column 或列说明无效
- Hive 笔记异常java.sql.SQLException: Unable to open a test connection to the given database.
- Using JAX-RS (Jersey) to build a JPA/JAXB-backed JSON REST API
- 多线程:C#线程同步lock,Monitor,Mutex,同步事件和等待句柄(上)
- Linux下Makefile的automake生成全攻略
- WEB系统截取字符串的几种方法
- fulllibc.lib 错误
- java.sql.SQLException: ORA-01799: a column may not be outer-joined to a subquery
- 七招帮你提高网页设计水平
- java.lang.OutOfMemoryError: PermGen space及其解决方法
- activeX数字签名
- jQuery入门学习九:仿GoogleSuggest
- 几种排序算法的比较
- Linux 信号signal处理机制
- Oracle_SID与Instance_name的区别
- storage memory和program memory划分