【发布时间】:2015-05-28 13:00:56
【问题描述】:
查询:
select /*+ full(c)parallel(c,4) */ a.*
from ioct_inv_item_all a,
(select udac_group_name, function_order , db_region, workflow_type, change_level
from ioct_function_target
where udac_group_name = 'Banner'
and function_name = 'emptyParam'
and workflow_type = 'CHGFCLTR'
and ('emptyParam' = 'emptyParam' or ('CHGFCLTR' != 'NEWITM' AND change_level = 'emptyParam') or ('CHGFCLTR' = 'NEWITM' and change_level = 'Simple') )
and sysdate between effective_from_date and effective_to_date ) b , item_ca c ,product_ca d,assignment_ca ac ,branches b
where a.udac_group_name = 'Banner'
and a.workflow_type = 'CHGFCLTR'
and a.DB_REGION = b.db_region (+)
and a.workflow_type = b.workflow_type (+)
and a.udac_group_name = b.udac_group_name (+)
and a.change_level = b.change_level (+)
and a.product_code = c.product_code(+)
and a.product_issue_num = c.product_issue_num(+)
and a.item_id = c.item_id(+)
and a.customer_id = c.customer_id(+)
and c.product_code = d.product_code(+)
and c.product_issue_num = d.product_issue_num(+)
and c.product_issue_year = d.product_issue_year(+)
and c.customer_id = d.customer_id(+)
and (case when c.contract_assignment_id IS NOT NULL
AND c.contract_assignment_id > 0
THEN c.contract_assignment_id
ELSE d.regular_assign_id
END) = ac.assignment_id(+)
and ('emptyParam' = 'emptyParam' OR ('CHGFCLTR' = 'NEWITM' AND a.eue_normal_ind = 'emptyParam') OR ('CHGFCLTR' != 'NEWITM' AND a.change_level = 'emptyParam') )
and (('emptyParam') IN ('emptyParam') OR a.region IN ('emptyParam'))
and ('emptyParam' = 'emptyParam'
OR (b.function_order is not null and a.assignee_group_seq = b.function_order)
OR (b.function_order is null and 'emptyParam' = 'emptyParam')
错误:
错误:
ORA-01417: 一个表最多可以外部连接到另一个表 01417. 00000 - “一个表最多可以外部连接到另一个表” *原因:
a.b (+) = b.b and a.c (+) = c.c不允许 *Action:检查这是否真的是你想要的,然后先加入 b 和 c 在一个视图中。 行错误:28 列:20
是否有任何机构建议在不使用关键字 LEFT OUTER JOIN 的情况下做同样的事情,因为我不想更改已经写好的 sql 查询的结构?
【问题讨论】:
-
你能发布完整的 SQL 吗?
标签: sql oracle oracle11g outer-join