I have attached the 3 tables I have below.
Trainers table
TrainerPlan Table
FitnessPlans Table
So what I am trying to do is show the FirstName, LastName, Phone, and Hours of all trainers who have a particular PlanID. So I tried
SELECT FirstName, LastName, Phone, Hours
FROM TRAINERS T INNER JOIN TRAINERPLAN TP
ON T.ID = TP.TrainerID
INNER JOIN FITNESSPLANS FP
ON TP.PlanID = FP.ID
WHERE FP.ID = 1;
I get the error:
What am I doing wrong? I have done sql in sql developer and this is how I would do it. I'm pretty sure access sql is not exactly the same, but if I run:
SELECT FirstName, LastName, Phone, Hours
FROM TRAINERS T INNER JOIN TRAINERPLAN TP
ON T.ID = TP.TrainerID;
This runs successfully and shows results, so I know the inner joining is working, but I just can't get another inner join on there for some reason.