SQL> select * from acctinactprocess;
ACCTNBR MEDIUMID
--------------------------------------- ---------------------------------------
3 8
4 9
1 1
2 2
SQL> select * from mediumpag;
MEDIUMID VOUHTYPE
--------------------------------------- ----------
1 vche
2 vcne
3 vtx
4 vcne
SQL>
SQL> select ai.acctnbr,ai.mediumid,md.vouhtype from acctinactprocess ai,mediumpag md where ai.mediumid=md.mediumid(+) and md.vouhtype(+) in('vche','vcne');
select ai.acctnbr,ai.mediumid,md.vouhtype from acctinactprocess ai,mediumpag md where ai.mediumid=md.mediumid(+) and md.vouhtype(+) in('vche','vcne')
ORA-01719: OR 或 IN 操作数中不允许外部联接运算符 (+)
SQL> select ai.acctnbr,ai.mediumid,md.vouhtype from acctinactprocess ai,mediumpag md where ai.mediumid=md.mediumid(+) and md.vouhtype(+)='vche'
2 union
3 select ai.acctnbr,ai.mediumid,md.vouhtype from acctinactprocess ai,mediumpag md where ai.mediumid=md.mediumid(+) and md.vouhtype(+)='vcne';
ACCTNBR MEDIUMID VOUHTYPE
---------- ---------- ----------
1 1 vche
1 1
2 2 vcne
2 2
3 8
4 9
6 rows selected