Update the merge stored procedure