Wednesday, March 21, 2012

Newbie Query Question

I have three tables I'm trying to query.
Table 1 - Employees
Table 2 - Cell Phones
Table 3 - Pagers
What I'm trying to do is query ALL of the employees in Table 1 and show
either their pager number or cell phone number or still list them even if
both those fields are Null.
Can someone help point me in the right direction. Everytime I try to run my
own query I just get the employees that have both a cell and a pager.
Any information would be greatly appreciated.
Thanks, Correyselect * from Employees E
left outer join CellPhones C on
C.EmployeeID = E.EmployeeID
left outer join Pagers P on
E.EmployeeID = P.EmployeeID
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Correy" <cgrist@.comcast.net> wrote in message
news:euChehtqIHA.2256@.TK2MSFTNGP05.phx.gbl...
>I have three tables I'm trying to query.
> Table 1 - Employees
> Table 2 - Cell Phones
> Table 3 - Pagers
> What I'm trying to do is query ALL of the employees in Table 1 and show
> either their pager number or cell phone number or still list them even if
> both those fields are Null.
> Can someone help point me in the right direction. Everytime I try to run
> my own query I just get the employees that have both a cell and a pager.
> Any information would be greatly appreciated.
> Thanks, Correy
>
>

No comments:

Post a Comment