Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> This SQL statement fails if joining table has no records.. why?
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
![]() |
![]() |