• I think this procedure is impressively well done.

    With that said, It does seem to be a bit of a solution looking for a problem. Writing the merge statement directly is not at all challenging and it seems easier to simply do that then learn the nuances of this procedure, especially since writing it directly permits it to be made more nuanced if so desired.

    ---
    Timothy A Wiseman
    SQL Blog: http://timothyawiseman.wordpress.com/