Thanks for the excellent article, and the wonderfully useful script. I can already think of a number of instances where something like this could have been huge time savers.
One thing of note, there appears to be a character that got lost in translation along the way.
On Line 114: There appears to be a single quote (') that was incorrectly converted to value '#39;'
WHERE DATA_TYPE IN ('Date', 'DateTime', 'SmallDateTime', #39;DateTime2', 'time')