More articles like this can be found on our SQL Data Access menu.
This is the SOP10100 'Merge' stored proc