Insert Into versus Select Into

ThisIsntMyRealName

Board Regular
Joined
May 23, 2009
Messages
69
Hey guys, I was using "SELECT INTO" in access 2007 to insert all values from one table into another. This function deletes the table then reinserts everything. If i wanted to use INSERT INTO and insert all values from 1 row of one table into another how would I write this?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Code:
INSERT INTO [Destination Table Name] (Field1, Field2,... )
SELECT [Source Table Name].Field1, [Source Table Name].Field2, ...
FROM [Source Table Name]
Of course, you may have criteria also (WHERE...).

In Access, adding new records from a query to an exisiting table is known as an Append Query. You can create this in Access using the Query Builder. The nice thing about that is you do not have to known SQL to do this. Or, if you want to know what the SQL would look like, create the query using the Query Builder, then switch the Query to SQL View. This is a great tool for verifying Query structure.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top