Last active
August 29, 2015 14:16
-
-
Save bradleykronson/324603a8d65bb427352d to your computer and use it in GitHub Desktop.
Get all property values of all items of a particular document type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT n.id AS nodeid , | |
n.text , | |
pt.Alias , | |
pd.dataInt , | |
pd.dataDate , | |
pd.dataNvarchar , | |
pd.dataNtext | |
FROM cmsPropertyData AS pd | |
INNER JOIN cmsPropertyType AS pt ON pt.id = pd.propertytypeid | |
INNER JOIN umbracoNode AS n ON n.id = pd.contentNodeId | |
WHERE pd.versionId IN ( | |
SELECT d.versionId | |
FROM cmsContent C | |
INNER JOIN cmsContentType CT ON C.contentType = CT.nodeId | |
INNER JOIN umbracoNode N ON C.nodeId = N.id | |
INNER JOIN dbo.cmsDocument d ON C.nodeId = d.nodeId | |
WHERE CT.alias = 'WG2K_Starter_AppSetting' | |
AND d.newest = 1 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment