Advertisement
Ruslan_Rayanov

CREATE PROCEDURE [dbo].[fm_tst-dynTreeItem_getItem]

Oct 24th, 2020
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[fm_tst-dynTreeItem_getItem]
  2. @itemID int,
  3. @username nvarchar(256)
  4.  
  5. AS
  6. BEGIN
  7. select '<b>Name:</b> ' + name + '<br>'+
  8. '<b>ID:</b> '+ cast(id as nvarchar) + '<br>'+
  9. '<b>Parent:</b> '+ isnull((select name from tst_cats where id =cat.parentID), 'no parent') + '<br>' +
  10. '<b>Nodes:</b> '+ cast((select count(*)
  11. from tst_cats where parentID = cat.id) as nvarchar) text
  12. from tst_cats cat where id = @itemID
  13.  
  14. select 'white' background
  15.  
  16. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement