奇妙なエラーの日です。
私はデータベースプロジェクトを使用し、展開後の一部として、SQLスクリプトを使用してテーブルにデータを入力します。
alter authorization on database::atlas to sa;
go
ALTER DATABASE ATLAS SET MULTI_USER WITH ROLLBACK IMMEDIATE;
GO
:r C:\Scripts\Script.DisableTriggers.sql
:r C:\Scripts\dbo\Script.dbo.PaymentMethod.sql
:r C:\Scripts\dbo\Script.dbo.TransactionEntryMethod.sql
:r C:\Scripts\dbo\Script.dbo.TransactionTypeGroup.sql
:r C:\Scripts\dbo\Script.dbo.TransactionType.sql
:r C:\Scripts\Script.EnableTriggers.sql
これらの各スクリプトは、以下のスクリプトと非常によく似ています。
SET IDENTITY_INSERT [dbo].[TransactionTypeGroup] ON
INSERT INTO [dbo].[TransactionTypeGroup] (TransactionTypeGroupID,TransactionTypeGroupName) VALUES
(1,'Inquiry')
, (2,'Points')
, (3,'Board')
, (4,'Guest Meals')
, (5,'Cash Equivalency')
, (6,'Deposits')
, (7,'Void/Void Tender')
, (8,'Refund')
SET IDENTITY_INSERT [dbo].[TransactionTypeGroup] OFF
GO
出力を取得すると、次のエラーが発生します。
(1 row(s) affected)
(1 row(s) affected)
(25 row(s) affected)
(11 row(s) affected)
(2 row(s) affected)
(598 row(s) affected)
(3 row(s) affected)
Msg 102, Level 15, State 1, Line 234
Incorrect syntax near 'OFFSET'.
SQLディレクトリ全体を検索しましたが、SQLファイルまたは発行しているコマンドにOFFSETという単語がありません。しかし、それでも私はそのエラーを受け取ります。
メッセージ102、レベル15、状態1、行234
「OFFSET」の近くの構文が正しくありません。
ここで何が起こっているのですか?