>I have a weird situation here. Here is the script:
>
>
>ALTER TABLE [Advertis] ADD [AddUserTemporary] int
>UPDATE [Advertis] SET [AddUserTemporary]=AddUser
>
>
>SQL Server is too smart and doesn't want to execute this script because the second line contains a field which does not exist. Well, I know that because I want to create it in the first line. But, because it validates the entire script before starting, I cannot execute this.
>
>Any idea?
Boris solved the same problem for me before - I needed to put the statement into execute('myStatement') which made it a separate batch and allowed the whole script to work correctly.
If it's not broken, fix it until it is.
My Blog