Skip to content

Instantly share code, notes, and snippets.

@Hendy
Last active August 29, 2015 14:15
Show Gist options
  • Save Hendy/c552a53d73ba10e688a9 to your computer and use it in GitHub Desktop.
Save Hendy/c552a53d73ba10e688a9 to your computer and use it in GitHub Desktop.
Umbraco - find all docTypes using a given dataTypeId
DECLARE @dataTypeId AS INT
SET @dataTypeId = 0 -- DataTypeId to query on
SELECT DISTINCT(B.alias)
FROM cmsPropertyType A
INNER JOIN cmsContentType B ON A.contentTypeId = B.nodeId
WHERE A.dataTypeId = @dataTypeId
ORDER BY alias ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment