Home » SQL & PL/SQL » SQL & PL/SQL » Re: need JOIN expert
Re: need JOIN expert [message #19710] Thu, 04 April 2002 09:49
Cynthia
Messages: 18
Registered: February 2000
Junior Member
Mickey's reply was great for me. but I would like more information about the statement: "If the WHERE clause contains a condition that compares a column from table B with a constant, the (+) operator must be applied to the column so that Oracle returns the rows from table A for which it has generated NULLs for this column. Otherwise Oracle will return only the results of a simple join. "

How does one apply the (+) to a column? In my SQL editor, I get an error if I put it into the SELECT clause. Here is an example: I might have a person without a boss, such as the head of a division or a vacancy.

Select E1.empno, E1.name, E2.boss (+)
from Employee E1, Employee E2
where E1.bossno = E2.empno (+)

In my case, if I use the (+) within the WHERE clause (and nothing in the SELECT clause), any person without a boss is not included in the results set.

Any hint on how I can solve my problem and get employees without bosses?
Previous Topic: Sorting a PL/SQL table
Next Topic: Calling Triggers.
Goto Forum:
  


Current Time: Fri Apr 26 00:05:35 CDT 2024