Query returns unwanted blank records

M

mabyn

Following is the SQL for a query that has four tables. The last two fields
are not populating with the data from their respective tables. I don't know
what I am doing incorrectly. Can someone assist me?

SELECT Attendees.AttendeeFirstName, Attendees.AttendeeLastName,
Attendees.CompanyName, Registration.[Entry Name], Registration.EventID,
ShamrockRatingPossible.ShamrockRating,
ShamrockRatingMarshalComments.MarshallComments
FROM ShamrockRatingPossible RIGHT JOIN (ShamrockRatingMarshalComments RIGHT
JOIN (Attendees RIGHT JOIN Registration ON Attendees.AttendeeID =
Registration.AttendeeID) ON ShamrockRatingMarshalComments.MarshalCommentsID =
Registration.ShamrocksGottenID) ON ShamrockRatingPossible.ShamrockRatingID =
Registration.ShamrockRatingID;
 
M

mabyn

My original SQL had INNER JOIN like:
SELECT Attendees.AttendeeFirstName, Attendees.AttendeeLastName,
Attendees.CompanyName, Registration.[Entry Name], Registration.EventID,
ShamrockRatingPossible.ShamrockRating,
ShamrockRatingMarshalComments.MarshallComments
FROM ShamrockRatingMarshalComments INNER JOIN (ShamrockRatingPossible INNER
JOIN (Attendees INNER JOIN Registration ON Attendees.AttendeeID =
Registration.AttendeeID) ON ShamrockRatingPossible.ShamrockRatingID =
Registration.ShamrockRatingID) ON
ShamrockRatingMarshalComments.MarshalCommentsID =
Registration.MarshalCommentsID;

However, no data shows up when I use that...so I tried LEFT JOIN and that
didn't work so I used RIGHT JOIN.
--
Mabyn


KARL DEWEY said:
Seems to me your joins are wrong. Try building them in design view.


mabyn said:
Following is the SQL for a query that has four tables. The last two fields
are not populating with the data from their respective tables. I don't know
what I am doing incorrectly. Can someone assist me?

SELECT Attendees.AttendeeFirstName, Attendees.AttendeeLastName,
Attendees.CompanyName, Registration.[Entry Name], Registration.EventID,
ShamrockRatingPossible.ShamrockRating,
ShamrockRatingMarshalComments.MarshallComments
FROM ShamrockRatingPossible RIGHT JOIN (ShamrockRatingMarshalComments RIGHT
JOIN (Attendees RIGHT JOIN Registration ON Attendees.AttendeeID =
Registration.AttendeeID) ON ShamrockRatingMarshalComments.MarshalCommentsID =
Registration.ShamrocksGottenID) ON ShamrockRatingPossible.ShamrockRatingID =
Registration.ShamrockRatingID;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top