Very handy script.
However, I found a little bug, and here is a recommendation for the little change in the script.
Replace ip.[column_name]
with '['+ ip.[column_name]+']'
in two places.
Having column names in square brackets makes omitting failures when reserved words (e.g. create, delete,...) are used for them.
Igor Micev,My blog: www.igormicev.com