SQL 带有多个 Insert 语句的压缩错误 80040E14

SQL Compact Error 80040E14 with multiple Insert statement

我正在尝试使用 SQL Lite Toolbox for Visual Studio 2015 在 SQL Compact DB 上执行此查询。

INSERT INTO [RadiatorRegistries] ([Brand], [Series], [Model], [Height], [Width], [Depth], [Whellbase], [Capacity], [Surface], [Q50], [Exp], [Typology], [Material], [Kc1], [Kc2], [KcR]) VALUES (N'Aermec', N'Climafon', N'33', 675, 1000, 140, 0, CAST(0.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2)), 2001, CAST(1.30 AS Decimal(18, 2)), N'Termoconvettore', N'Alluminio', CAST(1.00 AS Decimal(18, 2)), CAST(1.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2)))
INSERT INTO [RadiatorRegistries] ([Brand], [Series], [Model], [Height], [Width], [Depth], [Whellbase], [Capacity], [Surface], [Q50], [Exp], [Typology], [Material], [Kc1], [Kc2], [KcR]) VALUES (N'Aermec', N'Climafon', N'41', 675, 1200, 140, 0, CAST(0.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2)), 1810, CAST(1.30 AS Decimal(18, 2)), N'Termoconvettore', N'Alluminio', CAST(1.00 AS Decimal(18, 2)), CAST(1.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2)))

返回的错误是:

[ Token line number = 2,Token line offset = 1,Token in error = INSERT ]
Error Code: 80040E14

如果我删除第二行,INSERT 工作正常,问题是我必须插入大约 2500 行,但我无法手动执行此操作。我也已经尝试在每一行的末尾添加一个分号。

有什么建议吗?

每行用 GO 分隔:

INSERT INTO [RadiatorRegistries] ([Brand],
GO
INSERT INTO [RadiatorRegistries] ([Brand],
GO

一种方法是使用 insert . . . selectunion all:

INSERT INTO [RadiatorRegistries]([Brand], [Series], [Model], [Height], [Width], [Depth], [Whellbase], [Capacity], [Surface], [Q50], [Exp], [Typology], [Material], [Kc1], [Kc2], [KcR]) 
    SELECT N'Aermec', N'Climafon', N'33', 675, 1000, 140, 0, CAST(0.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2)), 2001, CAST(1.30 AS Decimal(18, 2)), N'Termoconvettore', N'Alluminio', CAST(1.00 AS Decimal(18, 2)), CAST(1.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2))
    UNION ALL
    SELECT N'Aermec', N'Climafon', N'41', 675, 1200, 140, 0, CAST(0.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2)), 1810, CAST(1.30 AS Decimal(18, 2)), N'Termoconvettore', N'Alluminio', CAST(1.00 AS Decimal(18, 2)), CAST(1.00 AS Decimal(18, 2)), CAST(0.00 AS Decimal(18, 2))