Query Question

  • Thread starter Oliver Whiteman
  • Start date
O

Oliver Whiteman

OK, I am going to try and word this as well as I can, but please bare with me!

I have two databases. One for the details of people, and one that holds
their phone numbers. A persons phone numbers are only added if necessary e.g.
if they have a mobile number, a new record is created in the numbers database
and labelled 'mobile'. If they don't have a mobile number, a 'mobile' record
will not exist for them.

I am trying to create a query (and report) to show the pager and mobile
numbers for all people, and to have a blank space for these numbers if they
do not exist. The output MUST be all on one line. At the moment I am only
able to either produce the required results on multiple lines, or else only
show those people that have BOTH numbers.

There MUST be a way around this, but i can not for the life of me figure it
out.

Please somebody help me!!!!
 
K

KARL DEWEY

SELECT People.PeopleID, People.LName, People.FName, Phone.Phone,
PMobile.Mobile, Pager.Pager
FROM ((People LEFT JOIN Phone ON People.PeopleID = Phone.PeopleID) LEFT JOIN
PMobile ON People.PeopleID = PMobile.PeopleID) LEFT JOIN Pager ON
People.PeopleID = Pager.PeopleID;
 
Top