我正在尝试在windows azure中运行我的SQL脚本。我使用SQLAzureMW v3.9.9.1 Release Binary
转换我的查询,当我尝试运行脚本时出现错误
转换为sp的Unclosed quotation mark after the character string ...
我的sp在MSSQL 2008
中很好。
转换前我的sp:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[EntryUpdate]
@EntryID INT,
@Value NVARCHAR(100),
@Text NVARCHAR(150),
@CurrencyCode NVARCHAR(50),
@DisplayLocale NVARCHAR(50),
@Description NVARCHAR(500),
@IsActive BIT,
@UpdatedBy NVARCHAR(256),
@Culture NVARCHAR(256)
AS
BEGIN
UPDATE dbo.Lists
SET
[Value] = @Value,
[Text] = @Text,
[CurrencyCode]=@CurrencyCode,
[DisplayLocale]=@DisplayLocale,
[Description] = @Description,
[IsActive]=@IsActive,
[UpdatedBy] = @UpdatedBy,
[UpdatedOn] = GETDATE()
WHERE [EntryID] = @EntryID AND Culture=@Culture
END
转换为SQLAzureMW v3.9.9.1 Release Binary
我的sp看起来:
--Other Procedure
'
END
GO
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EntryUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[EntryUpdate]
@EntryID INT,
@Value NVARCHAR(100),
@Text NVARCHAR(150),
@CurrencyCode NVARCHAR(50),
@DisplayLocale NVARCHAR(50),
@Description NVARCHAR(500),
@IsActive BIT,
@UpdatedBy NVARCHAR(256),
@Culture NVARCHAR(256)
AS
BEGIN
UPDATE dbo.Lists
SET
[Value] = @Value,
[Text] = @Text,
[CurrencyCode]=@CurrencyCode,
[DisplayLocale]=@DisplayLocale,
[Description] = @Description,
[IsActive]=@IsActive,
[UpdatedBy] = @UpdatedBy,
[UpdatedOn] = GETDATE()
WHERE [EntryID] = @EntryID AND Culture=@Culture
END
'
----Other Procedure
我搜索但我无法找到任何线索。对此错误有任何想法。谢谢。
答案 0 :(得分:0)
CREATE PROCEDURE [dbo].[sp_ListEntryUpdate]
@EntryID INT,
@Value NVARCHAR(100),
@Text NVARCHAR(150),
@CurrencyCode NVARCHAR(50),
@DisplayLocale NVARCHAR(50),
@Description NVARCHAR(500),
@IsActive BIT,
@UpdatedBy NVARCHAR(256),
@Culture NVARCHAR(256)
AS
BEGIN
UPDATE dbo.Lists
SET
[Value] = @Value,
[Text] = @Text,
[CurrencyCode]=@CurrencyCode,
[DisplayLocale]=@DisplayLocale,
[Description] = @Description,
[IsActive]=@IsActive,
[UpdatedBy] = @UpdatedBy,
[UpdatedOn] = GETDATE()
WHERE [EntryID] = @EntryID AND Culture=@Culture
END