Updating SQL Tables with store procedures
Posted on 2007-11-27
I have another question on EE that is related to this one, but this is more specific.
I am working on a method of updating a live data table on my SQL server with outside data.
It has been suggested that I import my data into a temporary SQL Table and then use a stored procedure to update the "live" table with data from the "temporary" table.
This will make it faster and I will have less issues than if I just deleted the contents of the "live" table and upated it with the "temporary". (thats what I do now)
I am not very familiar with SQL Server.
How can I create such a stored procedure?
The two tables are identical.
I want a procedure that will update the live table with data from the temp table.
I would imagine it would be good if only new data was added and only records that had something different were updated, but I am not sure if that is possible. (there are 35 'columns')
A sample or pointer to a complete sample woulkd be most helpful.
Assume I am a SQL dummy.