Advertisement
Guest User

Untitled

a guest
Feb 26th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WITH n(nodeId, alias,mastercontenttype,icon,thumbnail) AS
  2.    (SELECT nodeId, alias,mastercontenttype,icon,thumbnail
  3.     FROM [cmsContentType]
  4.     UNION ALL
  5.     SELECT nplus1.nodeId, nplus1.alias , nplus1.mastercontenttype, nplus1.icon,nplus1.thumbnail
  6.     FROM [cmsContentType] AS nplus1, n
  7.     WHERE n.nodeId = nplus1.masterContentType)
  8.  
  9. SELECT DISTINCT cmsContentType_1.alias,n.nodeId,n.alias,n.icon,n.thumbnail FROM n
  10. LEFT OUTER JOIN
  11. dbo.cmsContentType AS cmsContentType_1
  12. ON n.masterContentType = cmsContentType_1.nodeId
  13. ORDER BY n.nodeId
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement