Re: A SQL question

From: Jeff <jeff_at_work.com>
Date: Tue, 04 Nov 2003 15:53:04 GMT
Message-ID: <bo8i10$mjq$1_at_cronkite.cc.uga.edu>


In article <29ff93bc.0311040706.68478886_at_posting.google.com>, alexsm_at_eudoramail.com (Alex) wrote:
>Hi everybody
>
>I am trying to apply an OUTER JOIN on multiple fields.
>
>Table1: (firstname, lastname)
>Table2: (firstname, lastname)
>
>Table2 has all firstnames which is in Table1
>Table2 has all lastnames which is in Table1
>But Table2 does not have all combination of (firstname, lastname) as
>Table1 does. For these rows I would like to have a NULL entry in
>Table2.
>
>The following is not working
>
>select t2.firstname, t2.lastname
>from table1 t1, table2 t2
>where t1.firstname = (+)t2.firstname
>and t1.lastname = (+)t2.lastname
>
>Any comment?

Define "not working."

The one thing that stands out to me is that the (+)'s need to follow the column names, not precede them. Like so:

select t2.firstname, t2.lastname
from table1 t1, table2 t2
where t1.firstname = t2.firstname(+)
and t1.lastname = t2.lastname(+); Received on Tue Nov 04 2003 - 16:53:04 CET

Original text of this message