by Yunuskhan (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB Script
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (5 Votes)
This is a very usefull code, which i want to share it with u all, as i am working on an accounting package, this package closes it files at year end, and places it in backup database files. But the running year may need reports based on old data, i.e. the date range from the close file. Here is the SQL which can be used to get data form multiply database file in the fastes possible manner.
SELECT Table1.*
FROM Table1
UNION ALL
SELECT Table1.*
FROM Table1 IN "C:\Test\OldDatabase1.mdb"
UNION ALL
SELECT Table1.*
FROM Table1 IN "C:\Test\OldDatabase2.mdb"
UNION ALL
SELECT Table1.*
FROM Table1 IN "C:\Test\OldDatabase3.mdb";