Two more issues with the script:
1. My SQL Server collation is case sensitive and therefore the procedure doesn't compile due to incorrect case usage
2. The code doesn't deal with computed columns - the created target table needs to recreate the computed column
If I get a chance I will revise the code and post.