troubleshooting Question

SQL coding - how to append data into a column of an existing table

Avatar of sarah_siu
sarah_siuFlag for United States of America asked on
Microsoft SQL Server
20 Comments1 Solution422 ViewsLast Modified:
I would like to automatically update an existing table within an SQL database with the most recent month end balances for each month but retain the data as it goes forward.  This refresh will occur monthly and i would like to retain all data refreshed going forward.  So for example, the table below is the existing table that i would like to append to:
(in Aug 2010)
Vendor ID     Jul2010     Aug2010     Sep2010    Oct2010     Nov2010
1                    12             13
2                    25             14
3                    35              3

(in Sep 2010)
Vendor ID     Jul2010     Aug2010     Sep2010    Oct2010     Nov2010
1                    12             13                 20
2                    25             14                 35
3                    35              3                   0

we have one table that contains the most recent month end data that we will be working with.  We also have month end tables that becomes available at the beginning of every month.

How can i do the SQL coding to update this table without losing data from previous months?


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 20 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros