Imported query from another access db has strange syntax error.

S

Simon

I have two databases (Access 2003) which have same tables. I imported
queries from one database into another database. Most of these queries have
preview error like:

Syntax error (missing operator) in query expression ‘TableA.’.

Same error is also found if I copy a working query’s SQL and parse it in a
new query in the same database.

Can someone help me, Please? Thanks.
 
D

David S via AccessMonster.com

I'd say that there's got to be something different about the tables involved
in the query in the two databases - how do you know that they're the same
tables?

You could confirm this by renaming the tables in the non-working database to
something else temporarily (like <tablename>_temp and exporting the
corresponding tables from the working database to the non-working one. If the
SQL still falls over, there's something weird going on: if it works, then
there must be something different about the tables. You could then narrow
down which table it is by progressively putting back the _temp tables, and
then you'd have to compare the problem table in both database field by field.
 
U

Union_98

How do you export a query (not the results but the query itself) to another
database? I've been copying and pasting each year and with over thirty
queries it takes way too much time.

I'm using Access 2000.

Thank you so much for any assistance you can offer!

DC
 
J

John Spencer

It's simpler to IMPORT into the new database if you can.

Open the new database
Select File: Get External Data: Import... from the menu
Locate and select the SOURCE database
Click the Import button
Click the Queries Tab
Click on the queries you want to import.
(You can click the options button to check the Import options. Unless you
import queries as Tables, you will import only the definitions)
 
Top