Error inserting table from second database

J

John

Hi

I am using following to append to my table a second table form another db;

INSERT INTO MyTableOne
(SELECT * FROM [My Table Two] IN 'C:\MyFolder\My DB.MDB')

I am getting a syntax error. What is the problem and how can I fix it?

Thanks

Regards
 
T

Tom van Stiphout

On Tue, 7 Apr 2009 01:41:22 +0100, "John" <[email protected]>
wrote:

If a path has special characters like <space> you need to wrap it in
double-quotes.

-Tom.
Microsoft Access MVP
 
H

Hans Up

John said:
I am using following to append to my table a second table form another db;

INSERT INTO MyTableOne
(SELECT * FROM [My Table Two] IN 'C:\MyFolder\My DB.MDB')

I am getting a syntax error. What is the problem and how can I fix it?

Try it without the parentheses. On my system, this one results in the
error message "Syntax error in INSERT INTO statement."

INSERT INTO tblImportTarget
(SELECT * FROM tblCompanies IN 'D:\Access\wip\My db.mdb');

But this one executes without error:

INSERT INTO tblImportTarget
SELECT * FROM tblCompanies IN 'D:\Access\wip\My db.mdb';
 
Top