Monday, March 14, 2005

 
Delete a SubTree


/*
Delete a subtree from the hierarchy
*/


CREATE PROC dbo.deleteSubTree
(@EmpId int)
AS
BEGIN
SET NOCOUNT ON
DECLARE @Hkey bigint

SELECT @Hkey = Hkey
FROM EmpHierarchy
WHERE EmpId = @EmpId

DELETE FROM EmpHierarchy
WHERE Path % @Hkey = 0


END



Comments:
free themeforest templates from Template Plaza. If you need it, just cheek link and I'll pm you direct download link.

www.templatedesk.com
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?