I have 4 sql scripts that I want to run in DACPAC in PostDeployment, but when I try to build a VS project for 3 of them, I get this error:
Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements.
Scripts contain only INSERT expressions in different tables in the database. And they are all structured like this
IF NOT EXISTS (SELECT 1 FROM dbo.Criteria WHERE Name = 'Mileage') INSERT INTO dbo.Criteria(Name) VALUES ('Mileage');
only for different tables and with different data.
My question is: why does VS complain about 3 of them when all the scripts are the same in terms of syntax and operations?
PS: adding "GO" between operators, as the proposed error does nothing.
sql sql-server visual-studio-2012 dacpac
Cosmin Ionascu Sep 09 '13 at 12:42 on 2013-09-09 12:42
source share