I have an append query that generates the following error message:
[Microsoft][ODBC SQL Server Driver][SQL Server] Each group by expression must contain at least one column that is not an outer reference. (#164)
I am sure that this query worked at one time, but now I am getting the error message.
Does anyone have an idea how I can get around this problem?
INSERT INTO tblTempPSPHeader ( PSPReferralId, CheckAmount, CheckDate )
SELECT tblTempPSPDetail.PSPReferralId, Sum(tblTempPSPDetail.AmountToPay) AS SumOfAmountToPay, Date() AS Expr1
GROUP BY tblTempPSPDetail.PSPReferralId, Date();