I have this query and it worked fine except until I add one more criteria "J.Code1" to the statement below and now I am receiving a syntax error message. I am not sure how to fix this.
SELECT R.PID, R.Total AS RTotal, L.Total AS LTotal, F.Total AS FTotal, J.Total AS JTotal
FROM (Group_Reason_Table AS R
INNER JOIN Group_Reason_Table AS L ON R.PID = L.PID)
INNER JOIN Group_Reason_Table AS F ON R.PID = F.PID
INNER JOIN Group_Reason_Table AS J ON R.PID = J.PID
WHERE R.Code1 = '0.0'
AND L.Code1 = '1.1'
AND F.Code1 = '4.1'
AND J.Code1 = '4.4'
Your help is appreciated, thank you!
SELECT R.PID, R.Total AS RTotal, L.Total AS LTotal, F.Total AS FTotal, J.Total AS JTotal
FROM (Group_Reason_Table AS R
INNER JOIN Group_Reason_Table AS L ON R.PID = L.PID)
INNER JOIN Group_Reason_Table AS F ON R.PID = F.PID
INNER JOIN Group_Reason_Table AS J ON R.PID = J.PID
WHERE R.Code1 = '0.0'
AND L.Code1 = '1.1'
AND F.Code1 = '4.1'
AND J.Code1 = '4.4'
Your help is appreciated, thank you!