尝试创建一个proc(从inv中删除项目)

时间:2013-03-31 03:34:40

标签: sql stored-procedures

我正在尝试创建一个proc,能够从我的inv游戏中删除项目 但我一直都失败了^^ 似乎我的查询不对或缺少某些东西

USE [OVERLIMIT_SHARD_NOW]
GO
/****** Object:  StoredProcedure [dbo].[_Remove_Items_From_Inv]    Script Date: 03/31/2013 04:18:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[_Remove_Items_From_Inv] /* by Me */

    @CharID INT

AS

SET NOCOUNT ON;

declare @ID64 INT ;

 (SELECT RefItemID FROM [DataBaseName].[dbo].[_Items] with(NOLOCK) WHERE ID64 = @ID64)

    BEGIN
        UPDATE _Inventory SET ItemID = 0 WHERE ItemID  IN ( SELECT ID64 FROM _Items WHERE RefItemID in ( 46440 , 46441 , 46442 ) and CharID = @CharID )
    END

SET NOCOUNT OFF;

0 个答案:

没有答案