Page 1 of 1

Union Query in Access: ODBC Call failed

Posted: 23 Nov 2006, 16:17
by JohnP
I get the following error message when trying to run a union query in Access against the Nominal Ledger file in SAGE Line 50:

ODBC Call Failed
Syntax Error: Invalid table specification (#0)

A simplifed extract of the query is:
SELECT NOMINAL_LEDGER.ACCOUNT_REF, NOMINAL_LEDGER.PRIOR_YR_MTH1 as Amount
FROM NOMINAL_LEDGER

UNION SELECT NOMINAL_LEDGER.ACCOUNT_REF, NOMINAL_LEDGER.PRIOR_YR_MTH2 As amount
FROM NOMINAL_LEDGER;

This works fine when run against a copy of the nominal ledger file.

Does anyone have any ideas please?

Posted: 28 Nov 2006, 14:29
by brucedenney
The ODBC drivers are slow and "quirky"

I generally create a copy of the table in Access and then run queeries on that table a lot faster and less quirky.