simon551
IS-IT--Management
- May 4, 2005
- 249
Hi,
I have a members table and a contact table. I'm trying to pull the information from the contact table twice. You see that I have a left join where contacttype is 1 and a left join where contacttype is 2. I'm running into problems getting the second left join to work. Any help is appreciated
SELECT tblMembers.*, Primary.[FirstName] & " " & Primary.[LastName] AS PCName, Primary.Phone, Primary.Email, Primary.Country, tblMembers.Expired
FROM (tblMembers (LEFT JOIN (Select * From tblContacts WHere ContactType=1) AS Primary ON tblMembers.MemberID = Primary.MemberID) LEFT JOIN ((Select * From tblContacts WHere ContactType=2) AS Secondary));
Thanks,
s
I have a members table and a contact table. I'm trying to pull the information from the contact table twice. You see that I have a left join where contacttype is 1 and a left join where contacttype is 2. I'm running into problems getting the second left join to work. Any help is appreciated
SELECT tblMembers.*, Primary.[FirstName] & " " & Primary.[LastName] AS PCName, Primary.Phone, Primary.Email, Primary.Country, tblMembers.Expired
FROM (tblMembers (LEFT JOIN (Select * From tblContacts WHere ContactType=1) AS Primary ON tblMembers.MemberID = Primary.MemberID) LEFT JOIN ((Select * From tblContacts WHere ContactType=2) AS Secondary));
Thanks,
s