>I guess you weren't exactly using SQL server to generate the script, you were pulling metadata from it and using SSMS to generate it. I've found SSMS very flaky in this regard, almost every script it generated had to be tweaked manually for this or that, even when generating for the same version of SQL as the SSMS.
>
>I'd recommend using Toad for SQL for this. Still not perfect, but much better - errors are rare, the checkboxes to flip most of the options are in a collapsible pane above the script, the script is in a full code pane and not in a card-sized editbox, and there's even a button to copy the whole script into an editor page. And you don't have to go through a series of right and left clicks to get to it, it's in the rightmost page when viewing a table (other pages are table properties, columns, browse, statistics etc).
This is very good information.
Thanks