爲什麼SSRS會拋出一個錯誤,指出在我的少於符號附近存在不正確的語法?'<'附近的語法錯誤'
-- ==========================================================
-- Create Stored Procedure Template for SQL Azure Database
-- ==========================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Campos,,Adrian>
-- Create date: <7/9/2014,,>
-- Description: <Query is meant to purge records in ONP_IL_MAYWOOD that are older than 3 months.,,>
-- =============================================
CREATE PROCEDURE <Purge_Overnight_3Months, sysname, Purge_Overnight_3Months>
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
DELETE FROM tblOverNightPermissions WHERE DateAndTime < DATEADD(month, -3, GETDATE());
END
GO
錯誤:
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near '<'.
您的查詢看起來是正確的。你確定這是一個嗎? –
這是說第6行,你的查詢中是這6行嗎? –
@KrisGruttemeyer這讓我感到困惑。對不起,我不夠清楚。上面的第6行是'SET QUOTED_IDENTIFIER ON',但是它抱怨第23行的'<'字符 – Adrian