When I run the following code via DataDirect ODBC Driver, it is throwing the
"Column 'dbo.LD.LaborCode' is invalid in the select list because it is not contained in either an aggregate function or a Group By clause."
This has been working fine for quite a while and has now only started throwing this error.
SELECT LaborCode, SUM(RegHrs + OvtHrs) AS Hours
FROM dbo.LD
WHERE (WBS1 IN ('0851.190791.20')) AND (TransDate BETWEEN '1/1/1901' AND '3/27/2019')
GROUP BY LEFT(LaborCode, LEN(LaborCode) - 1)