Replicate data objects using new tables/data

G

Guest

I have a database that started off with just a few tables. There are now
hundreds of objects that were created by querying those few tables. I
recently downloaded a new database containing updated tables, and I would
like to know if it is somehow possible to replicate all of the existing
queries and tables from the old database without having to run each one using
the new tables in the new database.
 
D

Douglas J. Steele

Are you saying you ran a bunch of Make Table queries, so that you've got
duplicated data now? Whatever for?

Write simple Select queries that go against the data so that you're not
creating additional data. Then, whatever data is in the original few tables
will be what your queries return whenever you run them.
 
D

David W. Fenton

I have a database that started off with just a few tables. There
are now hundreds of objects that were created by querying those
few tables. I recently downloaded a new database containing
updated tables, and I would like to know if it is somehow possible
to replicate all of the existing queries and tables from the old
database without having to run each one using the new tables in
the new database.

First off, your app should be split into a data MDB (tables only)
and the application MDB (with your queries and forms and so forth).
Then you can use the applcaition MDB against any back end simply by
using the Linked Table manager to point to different back end data
tables.

Now, if the tables have different names but the exact same
structure, you can delete your links, create links to the new data
file, then rename the table links to match the table names used by
your queries and so forth.

Another thing to do with differently named tables is to use aliases.
If you have this SQL:

SELECT *
FROM MyTable

and you want to see the data in YourTable, you could do this:

SELECT *
FROM YourTable AS MyTable

Obviously, in a trivial query like that, there's no advantage in
aliasing, since the table name is not used anywhere else. But if
your SELECT statement has a lot of references to table names, and
you have multiple tables in your FROM statement, this can allow you
to adapt the query to a different table very easily.
 

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

Top