Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> This SQL statement fails if joining table has no records.. why?

This SQL statement fails if joining table has no records.. why?

From: Phil Powell <soazine_at_erols.com>
Date: 15 Aug 2002 12:35:49 -0700
Message-ID: <1cdca2a7.0208151135.796e1625@posting.google.com>


select r.intCompanyRepID, r.strCompanyRepFirstName, r.strCompanyRepLastName,

        m.*
 from tblCompanyRep r, tblCompanyRepMeeting rm, tblMeeting m  where r.intCompanyRepID = rm.intCompanyRepID (+)  and rm.intMeetingID = m.intMeetingID (+)  and m.intMeetingID = 155

This SQL call will return no rows, however, I want it to return at least one row for m.* even if there are no rows in tblCompanyRepMeeting. tblCompanyRepMeeting is a joining table containing fields intMeetingID and intCompanyRepID that correspond to tblMeeting and tblCompanyRep respectively.

If no rows exist that tie the two tables together I still want stuff to come back from tblCompanyRep and tblMeeting anyway. I can't figure out how to do that, even with two outer joins, which I thought would solve the problem.

Anyone know what I should do?
Thanx
Phil Received on Thu Aug 15 2002 - 14:35:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US