MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
CREATE PROCEDURE [dbo].[INSERT_NESTED_SET_WEBPAGE] @varTitle varchar(256), @parent int AS -- get the parent's rgt value DECLARE @parentRight int; SELECT @parentRight = rgt FROM my_data WHERE ID = @parent -- make room for the new child (at the end of the nested set) UPDATE my_data SET lft = lft + 2 WHERE lft >= @parentRight UPDATE my_data SET rgt = rgt + 2 WHERE rgt >= @parentRight -- insert the new child (at the end of the nested set) INSERT INTO my_date (title, lft, rgt) VALUES ( @varTitle, @parentRight, @parentRight + 1) GO
|MS SQL with ODBC||5||34|
|SSRS 2013 - Creating a summarized report||19||32|
|Query Help - MSSQL - Averages||5||25|
|How To Convert Date Stored as Varchar as an MSSQL DATE Type Field In a VIEW||3||20|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
8 Experts available now in Live!