SQL Server Stored Procedure to update records
Posted on 2013-06-27
I have a view built that combines data for 2 tables. Its filtered to return just the records I need. I want to update data in each of the two tables (just updating two fields in each table, i an int and a varchar field). At the same time I want to insert data into a 3rd table not in the view. So for each record in the dataset, update 2 fields in each table and then insert a record into another table for each record updated. That last part of inserting I'd like to call a stored procedure that is already built. Is this possible? The goal is to update the records in bulk and capture that it was done and by who in another table. I hope this makes sense. I'm using SQL Server 2008. Thanks.