G
Guest
The following query works with Access linked tables:
SELECT ACCOUNT, Date() AS [Current Date], 0 AS Historical
FROM [Local Exchange G/L]
GROUP BY ACCOUNT, Date(), 0;
When we switched to SQL linked tables, we got the following error:
ODBC – call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]GROUP BY expressions must
refer to column names that appear in the select list. (#164)
When we removed the Current Date and Historical columns, the query worked.
It also worked when we changed the Current Date column from a Group to a Max
and the Historical column from a group to a Sum.
Since the entire application has many queries which may have this situation,
is there a way to change something on the SQL Server side so the queries do
not have to be changed ?
SELECT ACCOUNT, Date() AS [Current Date], 0 AS Historical
FROM [Local Exchange G/L]
GROUP BY ACCOUNT, Date(), 0;
When we switched to SQL linked tables, we got the following error:
ODBC – call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]GROUP BY expressions must
refer to column names that appear in the select list. (#164)
When we removed the Current Date and Historical columns, the query worked.
It also worked when we changed the Current Date column from a Group to a Max
and the Historical column from a group to a Sum.
Since the entire application has many queries which may have this situation,
is there a way to change something on the SQL Server side so the queries do
not have to be changed ?