OK. I use the Access version of that SQL statement quite frequently... if the original data was in Access, I wouldn't even be having this problem...
...but how do you specify a remote path in the SQL version?
insert into db2.dbo.table2 select * from db1.dbo.table1
How do I specify a path and db filename of an Access database in the above example?
WATYF
Main Topics
Browse All Topics





by: iboutchkinePosted on 2004-10-11 at 10:22:03ID: 12278684
You can use SQL to insert from one table into another in external database
========== =
For SQL Server
=============
insert into db2.dbo.table2 select * from db1.dbo.table1
For MS Access
=============
INSERT INTO Table1 IN 'ExternalDatabasePath1' SELECT *
FROM Table1 IN 'ExternalDatabasePath2';
where externaldatabasepath1 & 2 are something like c:\databases\db1.mdb & c:\databases\db2.mdb
(INSERT INTO Table1 SELECT * FROM Table2 IN 'c:/aaa/bbb/Database.mdb')
Database, which engine is understood by VB
==========================
You can also add a type to the end of the IN clause such as "dBASE IV" e.g.,
INSERT INTO Table1 IN 'ExtDB' 'dBASE IV' SELECT * ....