>>Just create a loop (DO WHILE) to split (STREXTRACT) your script in several parts where the word GO is the delimiter and execute the parts individually.
>>
>>Walter,
>
>Ok, I'll go with two separate scripts then.
The trouble is on SQL side - some commands simply have to be the first in a batch, can't be in the middle. It's a shortcoming of the parser and the syntax it allows, which Microsoft hasn't fixed yet, so I guess they never will.