[ This Procedure FB ] Anyone can edit it and send me new procedure
Want Delete IT From Procedure [ Variance=0 ]
When i try to delete it from procedure
Get This Error
Msg 156, Level 15, State 1, Procedure FB, Line 57
Incorrect syntax near the keyword 'where'.
Thanks
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[FB] Script Date: 14/03/2017 12:00:00 ص ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
CREATE PROCEDURE [dbo].[FB]
@CHARID INT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @ItemID int
,@Charname VarChar(50)
,@Head int
,@CHEST int
,@LEGS int
@
int ,@HAND int
,@FOOT int
@
int @
int @
int ,@ERRING int
@
int @
int SELECT @Charname=CHARNAME16 FROM SRO_VT_SHARD.._CHAR WHERE CHARID=@Charid
SET @Charid = (select CharID from SRO_VT_SHARD.._Char where CharName16=@Charname)
SET @Head = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=0 and CharID=@Charid)
SET @CHEST = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=1 and CharID=@Charid)
SET @LEGS = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=4 and CharID=@Charid)
SET @
= (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=2 and CharID=@Charid) SET @HAND = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=3 and CharID=@Charid)
SET @FOOT = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=5 and CharID=@Charid)
SET @
= (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=11 and CharID=@Charid) SET @
= (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=12 and CharID=@Charid) SET @
= (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=10 and CharID=@Charid) SET @ERRING = (Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=9 and CharID=@Charid)
SET @
=(Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=6 and CharID=@Charid) SET @
=(Select ItemID from SRO_VT_SHARD.dbo._Inventory where Slot=7 and CharID=@Charid) update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =858993459290,
MagParam2 =7301444403351,
MagParam3 =34359738441,
MagParam4=257698037899,
MagParam5=7301444403363,
MagParam6=34359738447,
Variance=0
where ID64 =@Head
---------------
update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =858993459290,
MagParam2 =257698037898,
MagParam3 =7301444403351,
MagParam4=7301444403363,
MagParam5=34359738441,
MagParam6=34359738447,
Variance=0
where ID64 =@CHEST
----------------------
update SRO_VT_SHARD.._Items
set MagParamNum=4,
MagParam1 =858993459290,
MagParam2 =257698037898,
MagParam3 =34359738447,
MagParam4=34359738441,
Variance=0
where ID64 @
----------------------
update SRO_VT_SHARD.._Items
set MagParamNum=4,
MagParam1 =858993459290,
MagParam2 =257698037898,
MagParam3 =34359738447,
MagParam4=34359738441,
Variance=0
where ID64 =@HAND
update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =858993459290,
MagParam2 =257698037898,
MagParam3 =7301444403351,
MagParam4=34359738447,
MagParam5=7301444403363,
MagParam6=34359738441,
Variance=0
where ID64 =@LEGS
-----------------------
update SRO_VT_SHARD.._Items
set MagParamNum=4,
MagParam1 =858993459290,
MagParam2 =257698037898,
MagParam3 =34359738447,
MagParam4=34359738441,
Variance=0
where ID64 =@FOOT
update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =34359738447,
MagParam2 =85899346101,
MagParam3 =85899346095,
MagParam4 =85899346089,
MagParam5 =85899346107,
MagParam6 =34359738441,
Variance=0
where ID64 @
update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =34359738447,
MagParam2 =85899346101,
MagParam3 =85899346095,
MagParam4 =85899346089,
MagParam5 =85899346113,
MagParam6 =34359738441,
Variance=0
where ID64 @
update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =34359738447,
MagParam2 =34359738441,
MagParam3 =85899346113,
MagParam4 =85899346107,
MagParam5 =85899346089,
MagParam6 =85899346101,
Variance=0
where ID64 @
update SRO_VT_SHARD.._Items
set MagParamNum=6,
MagParam1 =34359738447,
MagParam2 =34359738441,
MagParam3 =85899346113,
MagParam4 =85899346107,
MagParam5 =85899346095,
MagParam6 =85899346089,
Variance=0
where ID64 =@ERRING
update SRO_VT_SHARD.._Items
set MagParamNum=5,
MagParam1 =34359738447,
MagParam2 =34359738441,
MagParam3 =858993459291,
MagParam4 =429496729715,
MagParam5 =257698037862,
Variance=0
where ID64 @
update SRO_VT_SHARD.._Items
set MagParamNum=4,
MagParam1 =858993459291,
MagParam2 =34359738441,
MagParam3 =34359738447,
MagParam4 =429496730022,
Variance=0
where ID64 @
set nocount off;
END






