Following SQL Scripts are available, and free to download.
SQL Server Script to Create a stored procedure to Update / Insert or Delete based on an existing table structure