Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Queries From another Database

Status
Not open for further replies.

Gootz11

Technical User
Jul 7, 2003
14
US
How do I run queries from another database?
or maybe there is a better way to do this.
here's what i am trying to do.
I have one database that uses data from 18 databases,
I need to run a querie which updates the data in each of this 18 databases. I would like to create a command that would update the data for this 18 databases from my central database.
any ideas
Thanks in advance.
JG
 
JG

Create ODBC links to your other database tables.
Then run your queries from the current app.

Hope this helps you.
 
To have a query use data from another database...
Open the query
Display the properties window
Scroll down to Source Database
Enter the full path and file name
Click on show table. This will display only the tables in the Source database. You can't directly mix external source and local tables using this method. Therefore, if you need to combine data from local and external databases, you would need to follow the advice from cghoga to create links. (Or alternatively create a third query that would join the Source Database query with another query/table to produce the external and local join.)

The neat thing about using the Source Database property is that if you are doing make table queries, you could have a database that contains no links or tables, only queries. The source could be from File A, The queries in File B and the Destination File C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top