Sabtu, 22 Maret 2014

[MS_AccessPros] Query to show all records.

 

I have a table: "ClubsActive" which is part of a query. I need every
club to be listed even if the club shows no records.
I am using this SQL:

SELECT ClubsActive.ClubName, tClubPostHolders.ClubID,
tClubPosts.tblClubPostID, Members.Directory, Members.AddressFull, Members.Email
FROM ClubsActive LEFT JOIN (tClubPosts RIGHT JOIN ((tRotaryYear RIGHT
JOIN tClubPostHolders ON tRotaryYear.YearID =
tClubPostHolders.YearID) LEFT JOIN Members ON
tClubPostHolders.MemberID = Members.MemberID) ON
tClubPosts.tblClubPostID = tClubPostHolders.ClubPostID) ON
ClubsActive.ClubID = tClubPostHolders.ClubID
WHERE (((tRotaryYear.YearStart)>"30/06/" &
Year(DateAdd("m",+6,Date())) And (tRotaryYear.YearStart)<="30/06/" &
Year(DateAdd("m",+18,Date()))))
ORDER BY ClubsActive.ClubName;

Clubs without entries in "tClubPostHolders" do not show.

What can I do to rectify the problem?

Many thanks,

Robin Chapple

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
.

__,_._,___

Tidak ada komentar:

Posting Komentar