needmoremoney
Technical User
Hello all I'm getting an error when I try to run this sql statement. The field "jobcode" is a text field. On the other hand, when I run the statement on a number field, the statement works fine. Any ideas, please let me know.
.....
SELECT EPayHist.id, EPayHistDetail.jobCode AS jobcodereg
INTO tempreport2
FROM (EPayHist
INNER JOIN EPayHistDetail
ON EPayHist.transaction = EPayHistDetail.transaction)
INNER JOIN CEarn
ON EPayHistDetail.detCode = CEarn.eCode
WHERE EPayHist.process >= [paramBeginProcess] AND
EPayHist.process <= [paramEndProcess] AND
EPayHistDetail.transactionType <> "X" AND
EPayHistDetail.det = "E" AND
CEarn.earnTypeCode = "Reg"
GROUP BY EPayHist.id;
UPDATE tempreport1
INNER JOIN tempreport2
ON tempreport1.id = tempreport2.id
SET tempreport1.jobcodereg = tempreport2.jobcodereg;
....
I get the error:
"You tried to execute a query that doesn't include the specified expression 'jobcode' as part of an aggregate function."
Any help.. thanks..much..
.....
SELECT EPayHist.id, EPayHistDetail.jobCode AS jobcodereg
INTO tempreport2
FROM (EPayHist
INNER JOIN EPayHistDetail
ON EPayHist.transaction = EPayHistDetail.transaction)
INNER JOIN CEarn
ON EPayHistDetail.detCode = CEarn.eCode
WHERE EPayHist.process >= [paramBeginProcess] AND
EPayHist.process <= [paramEndProcess] AND
EPayHistDetail.transactionType <> "X" AND
EPayHistDetail.det = "E" AND
CEarn.earnTypeCode = "Reg"
GROUP BY EPayHist.id;
UPDATE tempreport1
INNER JOIN tempreport2
ON tempreport1.id = tempreport2.id
SET tempreport1.jobcodereg = tempreport2.jobcodereg;
....
I get the error:
"You tried to execute a query that doesn't include the specified expression 'jobcode' as part of an aggregate function."
Any help.. thanks..much..