79648355

Date: 2025-06-02 07:51:50
Score: 2
Natty:
Report link

Currently the query is made up of two linked queries. If I add an intermediate table

tblUser

as part of the Join, the query runs now correctly, and every time.

SELECT qselStat_Batting.cbtUserID_DB, Count(qselStat_Batting.plyMatchID_PC) AS ContribValue, 1 AS StatTypeID
FROM (qselStat_Batting INNER JOIN qselPlayerTeam ON (qselStat_Batting.cmdMatchTypeID_PC = qselPlayerTeam.cmdMatchTypeID_PC) AND (qselStat_Batting.sidTeamID_DB = qselPlayerTeam.plyTeamID_DB)) INNER JOIN tblUser ON (qselPlayerTeam.plyUserID_DB = tblUser.usrUserID_DB) AND (qselStat_Batting.cbtUserID_DB = tblUser.usrUserID_DB)
WHERE (((qselPlayerTeam.plyMatchID_PC)=6178576) AND ((qselStat_Batting.mtcMatchDate)<([qselPlayerTeam].[mtcMatchDate])))
GROUP BY qselStat_Batting.cbtUserID_DB;

Does this mean that the original source queries should not be joined directly?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: L'le Tom