No that is not possible. When you have a specific amount of depth you
can, using multiple JOINS and separating the result with the IsNull. 

An example SPOC in MSSQL which returns a ColdFusion list with id's
seperated with || and a list with labels separated with ||:

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

ALTER  PROCEDURE dbo.upu_Instance_SitePath
        @PageID int,
        @SitePath       varchar (1000)  OUTPUT,
        @PageIDs        varchar (1000)  OUTPUT
AS
-- Variables
DECLARE @lParentID      int
DECLARE @lSitePath      varchar (1000)
DECLARE @lPageIDs       varchar (1000)
-- Find Parent and Label
SELECT  @lParentID = I.ParentID,
                @lSitePath = I.Label,
                @lPageIDs = I.InstanceID
FROM    dbo.Instance I
WHERE   (I.InstanceID = @PageID)
-- Resolve sitepath recursive
-- Subpages
IF (@lParentID <> 0) BEGIN
        EXEC    dbo.upu_Instance_SitePath
                        @PageID = @lParentID,
                        @SitePath = @SitePath   OUTPUT,
                        @PageIDs = @PageIDs             OUTPUT
        -- Add label of current page to the full sitepath

        SELECT  @SitePath = @SitePath + '|| ' + @lSitePath,
                        @PageIDs = @PageIDs + '|| '  + @lPageIDs
END
-- Homepage
ELSE BEGIN
        SELECT  @SitePath = @lSitePath,
                        @PageIDs = @lPageIDs
END
-- The End
RETURN (0)

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


Micha Schopman
Software Engineer

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188612
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to