首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

Must declare the variable '@PushDay'

2012-03-20 
求助Must declare the variable @PushDayset ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo--

求助Must declare the variable '@PushDay'
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author: sd
-- Create date: 2012-02-03 15:40
-- Description:重新启动任务
-- =============================================
ALTER PROCEDURE [dbo].[USP_OTSS_SendSgsExpiredRestartTask] 
@BusinessTaskId INT
@PushDay INT
AS
BEGIN

BEGIN TRANSACTION

UPDATE [OTSS_SendSgsTask]
SET [TaskStatus] = 0,[EndTime] = (select dateadd(day,@PushDay,(select getdate())))
WHERE [BusinessTaskId] = @BusinessTaskId

COMMIT TRANSACTION

END

Must declare the variable '@PushDay'哪错了?

[解决办法]
ALTER PROCEDURE [dbo].[USP_OTSS_SendSgsExpiredRestartTask]
@BusinessTaskId INT,
@PushDay INT
AS
BEGIN

BEGIN TRANSACTION

UPDATE [OTSS_SendSgsTask]
SET [TaskStatus] = 0,[EndTime] = (select dateadd(day,@PushDay,(select getdate())))
WHERE [BusinessTaskId] = @BusinessTaskId

COMMIT TRANSACTION

END

少了个 , 号
[解决办法]
参数间少逗号

热点排行