我想把
SATBSTDCUS.crsysdt = (select max(crsysdt) from SATBSTDCUS where PLANT = imtbinvmst.Plant
AND MATNO = imtbinvmst.matno )条件加在 left outer join中去,不清楚该怎么实现出来?还有如果两个做外连接的表要用到两个以上的列的话,该怎么用?
能这样吗? select
from A left outer join on a.column1= B.column1(+) and a.column2=b.column2(+)
但是我这里要牵扯到多个表,如果如下链接的话,Oracle会出现以下错误信息:
A.matno = B.matno(+)
AND A.plant(+)= C.plant AND A.matno(+)= C.matno
and A.plant(+)= E.plant AND A.matno(+)= E.matno
and A.plant(+)= D.plant AND A.sloc(+)= D.sloc
AND B.matgrp(+)= F.matgroup
and A.plant(+)= G.plantOracle 会出现以下错误:ORA-01417: a table may be outer joined to at most one other table,烦请高人指导?
SATBSTDCUS.crsysdt = (select max(crsysdt) from SATBSTDCUS where PLANT = imtbinvmst.Plant
AND MATNO = imtbinvmst.matno )条件加在 left outer join中去,不清楚该怎么实现出来?还有如果两个做外连接的表要用到两个以上的列的话,该怎么用?
能这样吗? select
from A left outer join on a.column1= B.column1(+) and a.column2=b.column2(+)
但是我这里要牵扯到多个表,如果如下链接的话,Oracle会出现以下错误信息:
A.matno = B.matno(+)
AND A.plant(+)= C.plant AND A.matno(+)= C.matno
and A.plant(+)= E.plant AND A.matno(+)= E.matno
and A.plant(+)= D.plant AND A.sloc(+)= D.sloc
AND B.matgrp(+)= F.matgroup
and A.plant(+)= G.plantOracle 会出现以下错误:ORA-01417: a table may be outer joined to at most one other table,烦请高人指导?
生成中间表就可解决问题
select a.*,b.* from exp1 a left join exp2 b on a.id=b.id或者select a.*,b.* from exp1 a,exp2 b where a.id=b.id(+)left join 不要和(+)同时用