How to execute multiple statements as one Batch on SQL
Hi All,
Just noticed the latest version (142.2675.6) does not do the following, or if it does I can't make it work.
Say I have something like this in the console
DECLARE @BrandId INT
DECLARE @ProductId INT
DECLARE @ModelId INT
SELECT @BrandId = 20, @ProductId =1043, @ModelId = 1060
I then select all the statements and execute them, this is the output I get.
sql> DECLARE @BrandId INT
[2015-08-03 21:20:31] completed in 74ms
sql> DECLARE @ProductId INT
[2015-08-03 21:20:32] completed in 69ms
sql> DECLARE @ModelId INT
[2015-08-03 21:20:32] completed in 45ms
sql> SELECT @BrandId = 20, @ProductId =1043, @ModelId = 1060
[2015-08-03 21:20:33] [S0001][137] Must declare the scalar variable "@BrandId".
I was expecting them all to be ran as a single batch and not individually.
This is running against an Azure SQL database and I am almost sure this worked before in previous version. Its been a month or two since I needed to run something like this, so cannot be sure. I switch between SQL Management Studio and 0xDBE depending on which environment I am using (Windows or Mac).
Any suggestions?
Regards
Richard....
请先登录再写评论。
Hi All,
I have just checked some of the old SQL files I ran in previous versions of 0xDBE and yes I have ran multiple statements as a single batch before. So I am expecting there is a switch somewhere which will allow this, hopefully :)
Regards
Richard...
Hello Richard,
I have created YouTrack issue for this, please follow the https://youtrack.jetbrains.com/issue/DBE-1430 for updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/206827497 if you are not familiar with YouTrack.