From 767e9762e0594db3a730d55dc48801d4375b2b38 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 28 Feb 2013 15:46:22 +0000 Subject: [PATCH] Corrected comment Added Ordinal to vefn_SiblingItems --- PROMS/DataLoader/PROMS2010.SQL | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PROMS/DataLoader/PROMS2010.SQL b/PROMS/DataLoader/PROMS2010.SQL index e95d693b..3601b0b7 100644 --- a/PROMS/DataLoader/PROMS2010.SQL +++ b/PROMS/DataLoader/PROMS2010.SQL @@ -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