drop table if exists #Reports select Path ,RdlContent = convert(xml, substring(convert(varchar(max), convert(varbinary(max), content)),44,10000000)) into #Reports from catalog where Type = 2 ;with xmlnamespaces( default 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' ,'http://schemas.microsoft.com/SQLServer/reporting/reportdesigner' as rd ,'http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition' as cl ,'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition/defaultfontfamily' as df ) select Report = r.Path ,DataSetName = T.c.value('@Name', 'varchar(1000)') ,SP = T.c.value('Query[1]/CommandText[1]', 'varchar(8000)') from #Reports r cross apply r.RdlContent.nodes('/Report/DataSets/DataSet') as T(c)
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.