Skip to content

Instantly share code, notes, and snippets.

@anth12
Last active March 3, 2017 08:44
Show Gist options
  • Save anth12/2193d877ef5984be582b49aee1a727eb to your computer and use it in GitHub Desktop.
Save anth12/2193d877ef5984be582b49aee1a727eb to your computer and use it in GitHub Desktop.
Umbraco Scripts
SELECT contentNodeId
FROM cmsPropertyData AS PD
INNER JOIN cmsPropertyType AS PT
ON PD.propertytypeid = PT.id
WHERE PD.versionId IN (
SELECT versionId
FROM [cmsDocument] AS D
INNER JOIN [cmsContent] AS C
ON D.nodeId = C.nodeId
INNER JOIN [cmsContentType] AS CT
ON C.contentType = CT.nodeId
--where CT.alias = 'textPage'
AND newest = 1
)
AND dataNText IS NOT NULL
AND dataNText LIKE '%dtdGuid":"00000000-0000-0000-0000-000000000000%'
GROUP BY contentNodeId
SELECT TOP 100
CT.alias, D.*
FROM [cmsDocument] AS D
INNER JOIN [cmsContent] AS C
ON D.nodeId = C.nodeId
INNER JOIN [cmsContentType] AS CT
ON C.contentType = CT.nodeId
SELECT TOP 1000 PT.Alias, PD.*
FROM cmsPropertyData AS PD
INNER JOIN cmsPropertyType AS PT
ON PD.propertytypeid = PT.id
WHERE PD.versionId IN (
SELECT versionId
FROM [cmsDocument] AS D
INNER JOIN [cmsContent] AS C
ON D.nodeId = C.nodeId
INNER JOIN [cmsContentType] AS CT
ON C.contentType = CT.nodeId
where CT.alias = 'textPage'
AND newest = 1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment