Append records to existing table using SELECT INTO

I loved your article on transferring Word form data to an Excel sheet at http://www.techrepublic.com/blog/10things/10-steps-to-transferring-word-form-data-to-an-excel-sheet/3484. The code uses an INSERT INTO SQL string, which writes over existing data. I’d like to append each record to an existing set of records. Any help would be appreciated. — Chris

Chris, you’ll be glad to hear that your problem has an easy solution: use the SELECT INTO SQL statement. Below, I’ve included two tutorial-type links to bring you up to speed on this statement:

http://www.sql-tutorial.net/SQL-SELECT-INTO.asp

http://msdn.microsoft.com/en-us/library/ms188263.aspx

The SELECT INTO statement will append each new record into an existing table.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s