I have an Access database in which I have a series of SQL server tables linked into Access with an ODBC connection. This is the SQL code in question:
SELECT [dbo_Account].[acct_id], [dbo_Agent].[AgentName]
FROM dbo_Account LEFT JOIN dbo_Agent ON [dbo_Account].[sales_rep]=left([dbo_Agent].[uid_Agent],8)
ORDER BY [dbo_Account].[acct_id];
This query sometimes runs as written under Office 2000 and it gives me correct results. If I open the query in Access SQL view mode, select all the text and cut it, then paste it back into the same SQL view window and try to go to Datasheet view (run the query), it dies with a message, “Join expression not supported”. Clearly the error is bogus because the query does run under the right conditions.
We have some clients running Office 2000 and some with Office 2003. In Office 2000, I can build the database from scratch, link the tables using ODBC, build the query in design view and then modify the SQL and the query will run. The same sequence in Office 2003 will not run. However, I have an Office 2000 database created some months ago where the query will work if opened under 2003. If I open the database under 2000, close it leaving Access up, create a new database and import only the tables from the old database, the query runs. Until I try pasting in the code. Then it fails. Arghhh!
SELECT [dbo_Account].[acct_id], [dbo_Agent].[AgentName]
FROM dbo_Account LEFT JOIN dbo_Agent ON [dbo_Account].[sales_rep]=left([dbo_Agent].[uid_Agent],8)
ORDER BY [dbo_Account].[acct_id];
This query sometimes runs as written under Office 2000 and it gives me correct results. If I open the query in Access SQL view mode, select all the text and cut it, then paste it back into the same SQL view window and try to go to Datasheet view (run the query), it dies with a message, “Join expression not supported”. Clearly the error is bogus because the query does run under the right conditions.
We have some clients running Office 2000 and some with Office 2003. In Office 2000, I can build the database from scratch, link the tables using ODBC, build the query in design view and then modify the SQL and the query will run. The same sequence in Office 2003 will not run. However, I have an Office 2000 database created some months ago where the query will work if opened under 2003. If I open the database under 2000, close it leaving Access up, create a new database and import only the tables from the old database, the query runs. Until I try pasting in the code. Then it fails. Arghhh!