Combining/merging two Recordsets into one (1 Viewer)

msowards

Registered User.
Local time
Today, 00:04
Joined
Feb 16, 2012
Messages
21
I have two recordsets(rst) one created in the current DB by a local query and the other created from and external DB with a second query. Both recordsets contain very similar data. Now I would like to merge the two recordsets. I would like to do this with a third query rather than a VBA process loop. To accomplish this would I need to create a temporary tables for both RSTs and then run the third query on them or can I run a query against the two RSTs?
By 'merge' I mean to add most records but remove the earlier of any records that have 4 specific columns that are equal. (Each record has a transaction date).
 

Isskint

Slowly Developing
Local time
Today, 08:04
Joined
Apr 25, 2012
Messages
1,302
hi msowards

You would need to use an APPEND QUERY.

If the 2 tables are similar this should work. However if there are major diffences then it would be necessary to do a little work first to make their similarities closer.
Just use the query wizard to create a query on the table you will keep least records from. In design view change it to an append query and specify the other table as the destination table. You will then need to identify the matching fields.
 

msowards

Registered User.
Local time
Today, 00:04
Joined
Feb 16, 2012
Messages
21
Thanks. I guess all I needed to hear is that I will have to use an intermediate table. I'll use Select INTO to create a table on the fly that I can subsequently run data massaging Queries against . Thanks..
 

vbaInet

AWF VIP
Local time
Today, 08:04
Joined
Jan 22, 2010
Messages
26,374
Where is the external DB and what db platform is it? Can you not link to that db and use a UNION join between them?
 

Users who are viewing this thread

Top Bottom