SET NOCOUNT ON DECLARE @Domain VARCHAR(50) SET @Domain = '/' SELECT c.[content_id], c.[content_title], c.[content_html], CASE WHEN c.[content_status] = 'A' THEN 'Approved' WHEN c.[content_status] = 'O' THEN 'Checked Out' WHEN c.[content_status] = 'I' THEN 'Checked In' WHEN c.[content_status] = 'S' THEN 'Submitted for Approval' WHEN c.[content_status] = 'M' THEN 'Marked for Deletion' WHEN c.[content_status] = 'P' THEN 'Pending Go Live Date' WHEN c.[content_status] = 'T' THEN 'Awaiting Completion of Associated Tasks' WHEN c.[content_status] = 'D' THEN 'Pending Deletion' END AS ContentStatus, c.[date_created], c.[approval_method], c.[searchable], cft.[folder_name], cft.FolderPath, (@Domain + uam.[urlaliasnm]) AS AliasURL, (@Domain + uam.[urltargetnm]) AS ActualURL FROM [content] c INNER JOIN [content_folder_tbl] cft ON c.folder_id = cft.folder_id INNER JOIN [UrlAliasMapping] uam ON uam.TargetID = c.content_id WHERE content_html LIKE '<PageData%' AND content_html LIKE '%dynamic%' -- name/type of widget or something else ORDER BY cft.FolderPath, content_title
Last Updated on October 26, 2015