Reputation: 363
I need to copy everything from one table to another. I thought a simple line of SQL would have worked but apparently not.
Code:
CurrentDb.Execute "SELECT * INTO _tmp_table2 FROM _tmp_table"
Error: _tmp_table2 already exists
I am copying from one table to another because the table its being copied into has a field set to primary key. How can I import and keep my table dataset
Upvotes: 0
Views: 84
Reputation: 56026
You are trying to create a table that does exist.
Try to append:
CurrentDb.Execute "INSERT INTO _tmp_table2 SELECT * FROM _tmp_table"
Upvotes: 1