(.generalselect)
DECLARE @NodeSiteID int = 1;
DECLARE @Now datetime2 = '4/14/2026 2:45:31 AM';
DECLARE @NodeAliasPath nvarchar(max) = N'/Expertise/%';
DECLARE @NodeLevel int = 2;
DECLARE @DocumentCulture nvarchar(max) = N'en-US';
SELECT *
FROM (
(
SELECT [PageGroupID], [MenuItemName], [MenuItemTeaserImage], [promo], [MenuItemGroup], [MenuNavGroups], [Excerpt], [showLearnMoreAnyway], [footerScripting], [CustomCanonicalLink], NULL AS [MenuItemID], NULL AS [BlogID], NULL AS [BlogName], NULL AS [BlogDescription], NULL AS [BlogSideColumnText], NULL AS [BlogTeaser], NULL AS [BlogOpenCommentsFor], NULL AS [BlogRequireEmails], NULL AS [BlogSendCommentsToEmail], NULL AS [BlogAllowAnonymousComments], NULL AS [BlogUseCAPTCHAForComments], NULL AS [BlogModerateComments], NULL AS [BlogModerators], NULL AS [BlogEnableSubscriptions], NULL AS [BlogEnableOptIn], NULL AS [BlogSendOptInConfirmation], NULL AS [BlogUnsubscriptionUrl], NULL AS [BlogOptInApprovalURL], NULL AS [ContentNodeID], NULL AS [Title], NULL AS [Content], [NodeID], [NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID], [NodeTemplateID], [NodeTemplateForAllCultures], [NodeInheritPageTemplate], [NodeAllowCacheInFileSystem], [NodeHasChildren], [NodeHasLinks], [NodeOriginalNodeID], [NodeIsContentOnly], [NodeIsACLOwner], [NodeBodyScripts], [DocumentID], [DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData], [DocumentExtensions], [DocumentTags], [DocumentTagGroupID], [DocumentWildcardRule], [DocumentWebParts], [DocumentRatingValue], [DocumentRatings], [DocumentPriority], [DocumentType], [DocumentLastPublished], [DocumentUseCustomExtensions], [DocumentGroupWebParts], [DocumentCheckedOutAutomatically], [DocumentTrackConversionName], [DocumentConversionValue], [DocumentSearchExcluded], [DocumentLastVersionNumber], [DocumentIsArchived], [DocumentHash], [DocumentLogVisitActivity], [DocumentGUID], [DocumentWorkflowCycleGUID], [DocumentSitemapSettings], [DocumentIsWaitingForTranslation], [DocumentSKUName], [DocumentSKUDescription], [DocumentSKUShortDescription], [DocumentWorkflowActionStatus], [DocumentMenuRedirectToFirstChild], [DocumentCanBePublished], [DocumentInheritsStylesheet], [ClassName], [ClassDisplayName], NodeLevel AS [CMS_O1], NodeOrder AS [CMS_O2], NodeName AS [CMS_O3], ROW_NUMBER() OVER (ORDER BY DocumentName) AS [CMS_SRN], 0 AS [CMS_SN], 'cms.document.intellicorp.pagegroup' AS [CMS_T]
FROM View_CMS_Tree_Joined AS V WITH (NOLOCK, NOEXPAND) INNER JOIN IntelliCorp_PageGroup AS C WITH (NOLOCK) ON [V].[DocumentForeignKeyValue] = [C].[PageGroupID] AND V.ClassName = N'IntelliCorp.PageGroup' LEFT OUTER JOIN COM_SKU AS S WITH (NOLOCK) ON [V].[NodeSKUID] = [S].[SKUID]
WHERE [NodeSiteID] = @NodeSiteID AND (([DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] <= @Now) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] >= @Now)) AND [NodeAliasPath] LIKE @NodeAliasPath AND [NodeLevel] <= @NodeLevel AND [DocumentCulture] = @DocumentCulture)
)
UNION ALL
(
SELECT NULL AS [PageGroupID], [MenuItemName], [MenuItemTeaserImage], [promo], [MenuItemGroup], [MenuNavGroups], [Excerpt], [showLearnMoreAnyway], [footerScripting], [CustomCanonicalLink], [MenuItemID], NULL AS [BlogID], NULL AS [BlogName], NULL AS [BlogDescription], NULL AS [BlogSideColumnText], NULL AS [BlogTeaser], NULL AS [BlogOpenCommentsFor], NULL AS [BlogRequireEmails], NULL AS [BlogSendCommentsToEmail], NULL AS [BlogAllowAnonymousComments], NULL AS [BlogUseCAPTCHAForComments], NULL AS [BlogModerateComments], NULL AS [BlogModerators], NULL AS [BlogEnableSubscriptions], NULL AS [BlogEnableOptIn], NULL AS [BlogSendOptInConfirmation], NULL AS [BlogUnsubscriptionUrl], NULL AS [BlogOptInApprovalURL], NULL AS [ContentNodeID], NULL AS [Title], NULL AS [Content], [NodeID], [NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID], [NodeTemplateID], [NodeTemplateForAllCultures], [NodeInheritPageTemplate], [NodeAllowCacheInFileSystem], [NodeHasChildren], [NodeHasLinks], [NodeOriginalNodeID], [NodeIsContentOnly], [NodeIsACLOwner], [NodeBodyScripts], [DocumentID], [DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData], [DocumentExtensions], [DocumentTags], [DocumentTagGroupID], [DocumentWildcardRule], [DocumentWebParts], [DocumentRatingValue], [DocumentRatings], [DocumentPriority], [DocumentType], [DocumentLastPublished], [DocumentUseCustomExtensions], [DocumentGroupWebParts], [DocumentCheckedOutAutomatically], [DocumentTrackConversionName], [DocumentConversionValue], [DocumentSearchExcluded], [DocumentLastVersionNumber], [DocumentIsArchived], [DocumentHash], [DocumentLogVisitActivity], [DocumentGUID], [DocumentWorkflowCycleGUID], [DocumentSitemapSettings], [DocumentIsWaitingForTranslation], [DocumentSKUName], [DocumentSKUDescription], [DocumentSKUShortDescription], [DocumentWorkflowActionStatus], [DocumentMenuRedirectToFirstChild], [DocumentCanBePublished], [DocumentInheritsStylesheet], [ClassName], [ClassDisplayName], NodeLevel AS [CMS_O1], NodeOrder AS [CMS_O2], NodeName AS [CMS_O3], ROW_NUMBER() OVER (ORDER BY DocumentName) AS [CMS_SRN], 1 AS [CMS_SN], 'cms.document.cms.menuitem' AS [CMS_T]
FROM View_CMS_Tree_Joined AS V WITH (NOLOCK, NOEXPAND) INNER JOIN CONTENT_MenuItem AS C WITH (NOLOCK) ON [V].[DocumentForeignKeyValue] = [C].[MenuItemID] AND V.ClassName = N'CMS.MenuItem' LEFT OUTER JOIN COM_SKU AS S WITH (NOLOCK) ON [V].[NodeSKUID] = [S].[SKUID]
WHERE [NodeSiteID] = @NodeSiteID AND (([DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] <= @Now) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] >= @Now)) AND [NodeAliasPath] LIKE @NodeAliasPath AND [NodeLevel] <= @NodeLevel AND [DocumentCulture] = @DocumentCulture)
)
UNION ALL
(
SELECT NULL AS [PageGroupID], NULL AS [MenuItemName], NULL AS [MenuItemTeaserImage], NULL AS [promo], NULL AS [MenuItemGroup], [MenuNavGroups], NULL AS [Excerpt], [showLearnMoreAnyway], [footerScripting], NULL AS [CustomCanonicalLink], NULL AS [MenuItemID], [BlogID], [BlogName], [BlogDescription], [BlogSideColumnText], [BlogTeaser], [BlogOpenCommentsFor], [BlogRequireEmails], [BlogSendCommentsToEmail], [BlogAllowAnonymousComments], [BlogUseCAPTCHAForComments], [BlogModerateComments], [BlogModerators], [BlogEnableSubscriptions], [BlogEnableOptIn], [BlogSendOptInConfirmation], [BlogUnsubscriptionUrl], [BlogOptInApprovalURL], NULL AS [ContentNodeID], NULL AS [Title], NULL AS [Content], [NodeID], [NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID], [NodeTemplateID], [NodeTemplateForAllCultures], [NodeInheritPageTemplate], [NodeAllowCacheInFileSystem], [NodeHasChildren], [NodeHasLinks], [NodeOriginalNodeID], [NodeIsContentOnly], [NodeIsACLOwner], [NodeBodyScripts], [DocumentID], [DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData], [DocumentExtensions], [DocumentTags], [DocumentTagGroupID], [DocumentWildcardRule], [DocumentWebParts], [DocumentRatingValue], [DocumentRatings], [DocumentPriority], [DocumentType], [DocumentLastPublished], [DocumentUseCustomExtensions], [DocumentGroupWebParts], [DocumentCheckedOutAutomatically], [DocumentTrackConversionName], [DocumentConversionValue], [DocumentSearchExcluded], [DocumentLastVersionNumber], [DocumentIsArchived], [DocumentHash], [DocumentLogVisitActivity], [DocumentGUID], [DocumentWorkflowCycleGUID], [DocumentSitemapSettings], [DocumentIsWaitingForTranslation], [DocumentSKUName], [DocumentSKUDescription], [DocumentSKUShortDescription], [DocumentWorkflowActionStatus], [DocumentMenuRedirectToFirstChild], [DocumentCanBePublished], [DocumentInheritsStylesheet], [ClassName], [ClassDisplayName], NodeLevel AS [CMS_O1], NodeOrder AS [CMS_O2], NodeName AS [CMS_O3], ROW_NUMBER() OVER (ORDER BY DocumentName) AS [CMS_SRN], 2 AS [CMS_SN], 'cms.document.cms.blog' AS [CMS_T]
FROM View_CMS_Tree_Joined AS V WITH (NOLOCK, NOEXPAND) INNER JOIN CONTENT_Blog AS C WITH (NOLOCK) ON [V].[DocumentForeignKeyValue] = [C].[BlogID] AND V.ClassName = N'CMS.Blog' LEFT OUTER JOIN COM_SKU AS S WITH (NOLOCK) ON [V].[NodeSKUID] = [S].[SKUID]
WHERE [NodeSiteID] = @NodeSiteID AND (([DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] <= @Now) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] >= @Now)) AND [NodeAliasPath] LIKE @NodeAliasPath AND [NodeLevel] <= @NodeLevel AND [DocumentCulture] = @DocumentCulture)
)
UNION ALL
(
SELECT NULL AS [PageGroupID], NULL AS [MenuItemName], NULL AS [MenuItemTeaserImage], NULL AS [promo], NULL AS [MenuItemGroup], NULL AS [MenuNavGroups], NULL AS [Excerpt], NULL AS [showLearnMoreAnyway], NULL AS [footerScripting], NULL AS [CustomCanonicalLink], NULL AS [MenuItemID], NULL AS [BlogID], NULL AS [BlogName], NULL AS [BlogDescription], NULL AS [BlogSideColumnText], NULL AS [BlogTeaser], NULL AS [BlogOpenCommentsFor], NULL AS [BlogRequireEmails], NULL AS [BlogSendCommentsToEmail], NULL AS [BlogAllowAnonymousComments], NULL AS [BlogUseCAPTCHAForComments], NULL AS [BlogModerateComments], NULL AS [BlogModerators], NULL AS [BlogEnableSubscriptions], NULL AS [BlogEnableOptIn], NULL AS [BlogSendOptInConfirmation], NULL AS [BlogUnsubscriptionUrl], NULL AS [BlogOptInApprovalURL], [ContentNodeID], [Title], [Content], [NodeID], [NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID], [NodeTemplateID], [NodeTemplateForAllCultures], [NodeInheritPageTemplate], [NodeAllowCacheInFileSystem], [NodeHasChildren], [NodeHasLinks], [NodeOriginalNodeID], [NodeIsContentOnly], [NodeIsACLOwner], [NodeBodyScripts], [DocumentID], [DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData], [DocumentExtensions], [DocumentTags], [DocumentTagGroupID], [DocumentWildcardRule], [DocumentWebParts], [DocumentRatingValue], [DocumentRatings], [DocumentPriority], [DocumentType], [DocumentLastPublished], [DocumentUseCustomExtensions], [DocumentGroupWebParts], [DocumentCheckedOutAutomatically], [DocumentTrackConversionName], [DocumentConversionValue], [DocumentSearchExcluded], [DocumentLastVersionNumber], [DocumentIsArchived], [DocumentHash], [DocumentLogVisitActivity], [DocumentGUID], [DocumentWorkflowCycleGUID], [DocumentSitemapSettings], [DocumentIsWaitingForTranslation], [DocumentSKUName], [DocumentSKUDescription], [DocumentSKUShortDescription], [DocumentWorkflowActionStatus], [DocumentMenuRedirectToFirstChild], [DocumentCanBePublished], [DocumentInheritsStylesheet], [ClassName], [ClassDisplayName], NodeLevel AS [CMS_O1], NodeOrder AS [CMS_O2], NodeName AS [CMS_O3], ROW_NUMBER() OVER (ORDER BY DocumentName) AS [CMS_SRN], 3 AS [CMS_SN], 'cms.document.intellicorp.contentnode' AS [CMS_T]
FROM View_CMS_Tree_Joined AS V WITH (NOLOCK, NOEXPAND) INNER JOIN IntelliCorp_ContentNode AS C WITH (NOLOCK) ON [V].[DocumentForeignKeyValue] = [C].[ContentNodeID] AND V.ClassName = N'IntelliCorp.ContentNode' LEFT OUTER JOIN COM_SKU AS S WITH (NOLOCK) ON [V].[NodeSKUID] = [S].[SKUID]
WHERE [NodeSiteID] = @NodeSiteID AND (([DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] <= @Now) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] >= @Now)) AND [NodeAliasPath] LIKE @NodeAliasPath AND [NodeLevel] <= @NodeLevel AND [DocumentCulture] = @DocumentCulture)
)
) AS SubData
ORDER BY CMS_O1, CMS_O2, CMS_O3, CMS_SRN, CMS_SN
@NodeSiteID (1)
@Now (4/14/2026 2:45:31 AM)
@NodeAliasPath ("/Expertise/%")
@NodeLevel (2)
@DocumentCulture ("en-US")
16.3 kB