Home » SQL & PL/SQL » SQL & PL/SQL » Please help for ORA-01416: two tables cannot be outer-joined to each other (Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production)
Please help for ORA-01416: two tables cannot be outer-joined to each other [message #610760] Mon, 24 March 2014 03:25 Go to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
hi,

When applying right outer join between 2 tables then getting error as : ORA-01416: two tables cannot be outer-joined to each other.


SELECT O.*
FROM   TAB1 O,
       TAB2  S
WHERE  O.col1 = O.ROW_ID(+)



Both tables coming to our envtt. through replication.
Re: Please help for ORA-01416: two tables cannot be outer-joined to each other [message #610762 is a reply to message #610760] Mon, 24 March 2014 03:34 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What do you plan to achieve by doing that? Why does FROM clause contain two tables (whose aliases are O and S), but you performed outer self join?!.
Re: Please help for ORA-01416: two tables cannot be outer-joined to each other [message #610767 is a reply to message #610762] Mon, 24 March 2014 03:44 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Littlefoot,

No, I have not used Self Join
Re: Please help for ORA-01416: two tables cannot be outer-joined to each other [message #610768 is a reply to message #610767] Mon, 24 March 2014 03:48 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
o.col1 = o.row_id is self join, eh?
Re: Please help for ORA-01416: two tables cannot be outer-joined to each other [message #610773 is a reply to message #610768] Mon, 24 March 2014 04:39 Go to previous message
msol25
Messages: 396
Registered: June 2011
Senior Member
hi Littlefoot,


Sorry it's typo mistake from my side.It's

O.SR_ID = S.ROW_ID(+)

Please ignore.....It's working fine


[Updated on: Mon, 24 March 2014 04:41]

Report message to a moderator

Previous Topic: How to display Last Day In Week Indicate As Y or N as input is start date and end date
Next Topic: Error while executing the plsql block for mview refresh
Goto Forum:
  


Current Time: Thu Mar 28 16:56:20 CDT 2024