• Thanks John!

    I've made a few changes based on your suggestions and attached v0.92:

    1) The generated script now includes a "USE [DatabaseName]" statement at the start, if the @include_use_db (bit) param is set to 1 (default).

    2) Fixed "has data changed?" check in the WHEN MATCHED clause to correctly test for NULL equality, on both sides (source & target).

    3) Dynamic query string variable (@Actual_Values) expanded to NVARCHAR(MAX) to cope with longer SELECT statements.

    Regarding the PRINT statement enhancement you suggested, I ran into an issue with truncation of result sets over 4000 characters in length. Any ideas how to get around this?