I've got 3 tables in the query.
Client
ClientSchool
SchoolDetails
Client holds hte general Client details which includes a ClientID
ClientSchool has the foregion Key ClientID and SchoolCode (both foregion keys)
SchoolDetails has the SchoolCode as the key and a schoolName
I'm trying to make a query which looks like so
SELECT
Client.clientName, Client.ClientAddress, ClientNumber, SchoolDetails.schoolName AS School
FROM
Client
LEFT JOIN ClientSchool ON Client.ClientID = ClientSchool.ClientID
LEFT JOIN SchoolDetails ON ClientSchool.SchoolCode = SchoolDetails.schoolName
WHERE (Client.ClientID = '1000123')
This should display ALL the client details from the Client table as well as any SchoolName if it finds a
matching reccord but it doesn't. Any ideas ?
Client
ClientSchool
SchoolDetails
Client holds hte general Client details which includes a ClientID
ClientSchool has the foregion Key ClientID and SchoolCode (both foregion keys)
SchoolDetails has the SchoolCode as the key and a schoolName
I'm trying to make a query which looks like so
SELECT
Client.clientName, Client.ClientAddress, ClientNumber, SchoolDetails.schoolName AS School
FROM
Client
LEFT JOIN ClientSchool ON Client.ClientID = ClientSchool.ClientID
LEFT JOIN SchoolDetails ON ClientSchool.SchoolCode = SchoolDetails.schoolName
WHERE (Client.ClientID = '1000123')
This should display ALL the client details from the Client table as well as any SchoolName if it finds a
matching reccord but it doesn't. Any ideas ?
Last edited: