• Hugo Kornelis (9/13/2012)


    If you change the SSMS configuration to use NotGo as batch seperator, then the script supplied will contain two batches. In each of those batches, @test-2 is declared exactly once. It should run perfectly. As you would have known if you have started SSMS and tested it. (Don't forget to set the batch seperator back to GO after you finish testing!)

    Again, I'm wrong, thanks Hugo :ermm:

    I did test it, but was too stupid to see what would have been seperate batches with the NotGo, and focused on the Declare instead... I'm going back to bed, I'll start the day again tomorrow :doze:

    _____________________________________________________________________
    [font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]