Hi all,
I have a need to select all checks that fall within an age threshold determined by a client's preference. For example, one client might choose a 30 day threshold, another might choose every ninety days.
I am receiving an error: "at most one record can be returned by this subquery."
Open to any suggestions, thanks.
I have a need to select all checks that fall within an age threshold determined by a client's preference. For example, one client might choose a 30 day threshold, another might choose every ninety days.
I am receiving an error: "at most one record can be returned by this subquery."
Open to any suggestions, thanks.
Code:
SELECT tblChecks.CheckID
FROM (tblChecks
INNER JOIN tblClients ON tblChecks.ClientID = tblClients.ClientID)
INNER JOIN tbl_UC_AGE ON tblClients.MV_UC_AGE = tbl_UC_AGE.ID
WHERE ((tblChecks.ActionID)=2000)
AND ((tblChecks.Status)=1)
AND ((tblChecks.Check_Date)<=DATE() - (SELECT a.AGE_DAYS FROM tbl_UC_AGE a
INNER JOIN tblClients b ON a.ID = b.MV_UC_AGE))
;