Questions tagged «dacpac»

3
SQL脚本中的错误:每批只允许一个语句
我有4个SQL脚本,希望在PostDeployment中的DACPAC中运行,但是当我尝试为其中3个构建VS项目时,出现此错误: Only one statement is allowed per batch. A batch separator, such as 'GO', might be required between statements. 脚本仅包含INSERT数据库不同表中的语句。所有的结构都像这样 IF NOT EXISTS (SELECT 1 FROM dbo.Criteria WHERE Name = 'Mileage') INSERT INTO dbo.Criteria(Name) VALUES ('Mileage'); 仅在不同的表和不同的数据上。 我的问题是,当所有脚本的语法和操作都相同时,为什么VS会抱怨其中的3个? PS:由于错误提示,在语句之间添加“ GO”不会执行任何操作。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.