Advertisement
hecrus

Tree RenameItem

Oct 24th, 2020
2,607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.51 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[tree_tst-catalog_renameItem]
  2.     @id nvarchar(128)
  3.     @name nvarchar(128),   
  4.     @username nvarchar(32)
  5. AS
  6. BEGIN  
  7.     update tst_categories
  8.     set name = @name
  9.     where id = @id
  10.    
  11.     declare @code nvarchar(max), @url nvarchar(max)
  12.    
  13.     set @code = dbo.cat_getCategoryCode(@id)
  14.     update tst_categories set code = @code where id = @id
  15.    
  16.     set @url = dbo.cat_getCategoryURL(@id)
  17.     update tst_categories set url = @url where id = @id  
  18.        
  19.     -- SELECT 1
  20.     Select 1 Result, '' Msg
  21. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement