How to import SQL databases automatically / by batch?

  • Thread starter Thread starter Simon Kwong
  • Start date Start date
S

Simon Kwong

Hi,

I have 20-30 SQL database files. How can I to import the data into Excel
files automatically or by batch (using macros)?

Thanks
Simon
 
There are a few method. The easiest to set up is to perform a query fro the
worksheet menu Data - Import External Data - New Databae Query.

the second metho is to use a macro to open the database a retrieve the data
using SQL. You can actually get the SQL statements by recording a macro when
you do an New Database Query. If you record the macro while performing a New
Database query the Command Text portion of the recorded macro is the SQL
statments.

If yo need help record the macro and post the rrecorded macro for additional
assitance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top