daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SET NOCOUNT ON
  2.  
  3. DECLARE @nAmount INT
  4. DECLARE @nCharId INT
  5. DECLARE @nItemType INT
  6.  
  7. SET @nItemType = 14543
  8. SET @nAmount = NULL
  9. SET @nAmount = NULL
  10.  
  11.  
  12. SELECT @nAmount = SUM(amount), @nCharId = char_id FROM user_item WHERE item_type = @nItemType GROUP BY char_id
  13.  
  14. UPDATE user_item SET amount = @nAmount WHERE char_id = @nCharId
  15.  
  16. GO
RAW Paste Data
Top