View Single Post
  #4  
Old April 13th, 2010, 04:08 PM posted to microsoft.public.access.modulesdaovba,microsoft.public.access.queries,microsoft.public.access.tablesdbdesign,microsoft.public.access
James A. Fortune
external usenet poster
 
Posts: 903
Default Make Table v. Append to Table: Need Some Expert Design Inputs

On Apr 13, 10:31*am, MJ wrote:
I am working on updates to a couple related databases (not linked by any
tables) and have a question about virtues of Make Table vs Append queries..

Make Table: *I understand that this will create a NEW table where ever it is
pointed,
* * * * * * * * * *so if that table already exists in the destination it
will be deleted, and
* * * * * * * * * *the new table written in its place..

Append * * *: In this case I understand that it would require a little more
"work" to
* * * * * * * * * *do same as Make Table, i.e. clearing out table before
appending data.

The 1st major difference, other than additional steps, I can see is if you
have a table structure you wish to retain the Append qry idea might be more
favorable over the Make table qry.

Okay, now you database gurus...
* (1) *Are there any other advantages/difierences one over the other?; and
* (2) *What about database size impacts. grow/shrink, assuming the amount of
data is fairly consistent from time to time of run?

--

MJ


"MJ",

Barring relationships, here's not a huge difference between using a
Make Table query and using an Append Query after a Delete Query. If
you use the Make Table query and have no relationships, you have to
add things like indices afterwards either by hand, through VBA or
through DDL, as well as running the Delete Query first (most cases);
and you're really gonna want those indices if the resulting table is
going to be joined with other tables. If you use an Append Query it
would be good to check that the table you're appending to exists. If
relationships exist, I'd say that swings the advantage to Append
Queries after running Delete Queries. One drawback with that
combination is that you should make sure that the Delete Query
finishes before starting the Append Query (perhaps by using
MyDB.RecordsAffected after a MyDB.Execute strSQL, dbFailOnError). If
the amount of data to be appended is large, you might want to put the
table in a separate .mdb file if you don't need to maintain
relationships, or keep the table in the backend and compact it
occasionally to remove bloat if you do need to maintain
relationships. The query plan shouldn't change much if the amount of
data is anywhere near consistent.

James A. Fortune