Skip to content

Instantly share code, notes, and snippets.

@aburok
Created May 30, 2018 12:09
Show Gist options
  • Save aburok/4bcc2b35039ecbd68d396ff8837f8ca7 to your computer and use it in GitHub Desktop.
Save aburok/4bcc2b35039ecbd68d396ff8837f8ca7 to your computer and use it in GitHub Desktop.
Umbraco SQL query document types with properties
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000
ct.pk,
ct.alias as 'Content Type Alias',
ct.icon as 'Content Type Icon',
pt.alias as 'Property Alias',
pt.Name as 'Property Name',
data.propertyEditorAlias as 'Property Editor',
data.dbType as 'Property DB Type',
t.alias as 'Template Alias'
FROM cmsContentType ct
left join [dbo].[cmsDocumentType] dt on dt.contentTypeNodeId = ct.nodeId
left join cmsTemplate t on dt.templateNodeId = t.nodeId
left join [cmsPropertyType] pt on ct.nodeId = pt.contentTypeId
left join [cmsDataType] data on data.[nodeId] = pt.[dataTypeId]
--where t.alias like 'ceo%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment