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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merge two tables

Status
Not open for further replies.

SidCharming

Technical User
Jun 18, 2003
73
US
I want to merge two tables with code. The colums are identical but the data is different in each. At no time is the data the same in both tables. I do not have another table that I can reference these two tables against. With code I want to merge the two tables and NOT make another table or query. This code will be called probably 6 times due to the same situation of double tables with different data 6 times.

My intent is not to have anything outside of my code left behind. I believe in not having millions of queries and extra tables unless I absolutely have to.


Sid from Minnesota
 
currentdb.execute "Insert into table1 select * from table2"
currentdb.execute "Delete * from table2"


But I would have thought a UNION SELECT view would be the neater solution..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top