Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Procedure to import from MDB to SQL Server DB

Author  Topic 

Fatalsniper
Starting Member

45 Posts

Posted - 2005-09-09 : 21:12:33
Hi there,

I want to write a Stored procedure to be able to import 4 tables from different Access 2000 databases at the same time, to SQL Server 7.

Is there a way to do something like:
SELECT * INTO CustomersSQL FROM CustomersMDB ("db1.mdb")
SELECT * INTO CustomersSQL FROM CustomersMDB ("db2.mdb")
SELECT * INTO CustomersSQL FROM CustomersMDB ("db3.mdb")
SELECT * INTO CustomersSQL FROM CustomersMDB ("db4.mdb")

SELECT * INTO SalesSQL FROM SalesMDB ("db1.mdb")
SELECT * INTO SalesSQL FROM SalesMDB ("db2.mdb")
SELECT * INTO SalesSQL FROM SalesMDB ("db3.mdb")
SELECT * INTO SalesSQL FROM SalesMDB ("db4.mdb")

I want to be able to select * from a table (SalesMDB) from an access MDB File (C:\path\dbx.mdb) and insert all the updates made to those tables each month by running a Stored Procedure.
Not sure still if it's the best way to acomplish this...

Thanks a lot guys!

<edit> Moved to proper forum </edit>
   

- Advertisement -