Hi, I have an issue when running multiple SQL statements through IDEA:
DECLARE @x int
SELECT * FROM MyTable WHERE id = @x
DECLARE @y varchar(max)
SELECT * FROM MyTable WHERE name = @y
...in this situation, the console spits out an error - @x is not declared. But if i run the scripts (between the go's) one by one it works fine.
How can I get this to work for the whole script?