Eewww!   That's not gonna be pretty, no matter how you do it.

Assuming that this is a one-time thing and that you can suffer through some
long-running queries, you're probably best off by creating a new Access
database that links to all the tables in the other two databases and
contains the new table(s) you want to populate.  Then, use either an Access
code module (or ColdFusion, though it's probably less efficient ) to handle
the SQL manipulations.

Without the table schemata, I can't tell you exactly, but start off by
trying an INSERT ... SELECT pair where your SELECT statement uses a
subquery as the FROM statement.  If the tables in the two databases have
common keys, use a JOIN instead of a subquery - that will be much faster,
but will become difficult very quickly if the tables are not very similar.

If that doesn't work, you'll probably be stuck using a cursor, which is
extremely slow and inefficient, and only recommended for late-night offline
processing if your tables have a large number of rows.
|-------------------------+-----------------------------------------------|
|Eric A. Laney            |If all you have is a hammer, everything looks  |
|Systems Engineer         |like a nail.                                   |
|LAN Optimization Team    |                                               |
|Verizon Data Services    |                                               |
|Voice: 813.978.4404      |                           Baruch's Observation|
|Pager: 888.985.8519      |                                               |
|-------------------------+-----------------------------------------------|





                                                                                       
                           
                    "Steven A.                                                         
                           
                    del Sol"             To:     SQL <[EMAIL PROTECTED]>           
                           
                    <steve@netpac        cc:                                           
                           
                    q.com>               Subject:     Access Question                  
                           
                                                                                       
                           
                    2001-11-15                                                         
                           
                    13:10                                                              
                           
                    Please                                                             
                           
                    respond to                                                         
                           
                    sql                                                                
                           
                                                                                       
                           
                                                                                       
                           




I have 2 databases with 98% the same information
is there a simple query that will parse out the information that is not the
same in both the databases to an empty database.

What should I do?  What do you recommend?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to