Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET NOCOUNT ON
- DECLARE @nAmount INT
- DECLARE @nCharId INT
- DECLARE @nItemType INT
- SET @nItemType = 14543
- SET @nAmount = NULL
- SET @nAmount = NULL
- SELECT @nAmount = SUM(amount), @nCharId = char_id FROM user_item WHERE item_type = @nItemType GROUP BY char_id
- UPDATE user_item SET amount = @nAmount WHERE char_id = @nCharId
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement