Corrected comment
Added Ordinal to vefn_SiblingItems
This commit is contained in:
parent
442198860c
commit
767e9762e0
@ -16897,7 +16897,7 @@ IF (@@Error = 0) PRINT 'TableFunction Creation: vefn_SiblingChildrenItems Succee
|
||||
ELSE PRINT 'TableFunction Creation: vefn_SiblingChildrenItems Error on Creation'
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [vefn_SiblingItems] ******/
|
||||
/****** Object: Table Function [vefn_SiblingItems] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vefn_SiblingItems]') AND OBJECTPROPERTY(id,N'IsTableFunction') = 1)
|
||||
DROP FUNCTION [vefn_SiblingItems];
|
||||
GO
|
||||
@ -16916,7 +16916,8 @@ CREATE FUNCTION [dbo].[vefn_SiblingItems](@ItemID int, @ParentID int)
|
||||
RETURNS @Siblings TABLE
|
||||
(
|
||||
ItemID int PRIMARY KEY,
|
||||
ContentID int
|
||||
ContentID int,
|
||||
Ordinal int
|
||||
)
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
@ -16933,7 +16934,7 @@ Union All
|
||||
from Itemz Z
|
||||
join Items I on I.PreviousID = Z.ItemID
|
||||
)
|
||||
insert into @Siblings select ItemID, ContentID from Itemz
|
||||
insert into @Siblings select ItemID, ContentID, Ordinal from Itemz
|
||||
OPTION (MAXRECURSION 10000)
|
||||
RETURN
|
||||
END
|
||||
|
Loading…
x
Reference in New Issue
Block a user