<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Query SSRS Report Schedules</title>
	<atom:link href="http://thinknook.com/query-ssrs-report-schedules-2011-06-26/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=query-ssrs-report-schedules</link>
	<description>Because the world needs another Business Intelligence blog!</description>
	<lastBuildDate>Fri, 14 Sep 2018 19:30:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>By: Cuervo</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-3446</link>
		<dc:creator><![CDATA[Cuervo]]></dc:creator>
		<pubDate>Thu, 08 Dec 2016 04:03:51 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-3446</guid>
		<description><![CDATA[Hi guys, someone can modify the ATIF Script in order to let me select between days in the column NextRunDate. The purpose of this modification is that I would like to check if in one specific date and time there won&#039;t reports to executed, otherwise I could not restart the service.




SELECT DISTINCT
–[Locale],
C.Name AS ReportName
,C.PATH AS ReportManagerPath
,S.Description AS SubscriptionDescription
,[EventType]
,CASE WHEN j.enabled = 1 THEN ‘Enabled’ ELSE ‘Disabled’ END AS ScheduledJob
,’NextRunDate’ = CASE WHEN J.enabled =1 THEN CAST(CASE next_run_date
WHEN 0 THEN NULL
ELSE
SUBSTRING(CONVERT(VARCHAR(15),next_run_date),1,4) + ‘/’ +
SUBSTRING(CONVERT(VARCHAR(15),next_run_date),5,2) + ‘/’ +
SUBSTRING(CONVERT(VARCHAR(15),next_run_date),7,2)
END + ‘ ‘ +
ISNULL(CASE LEN(next_run_time)
WHEN 3 THEN CAST(’00:0′
+ LEFT(RIGHT(next_run_time,3),1)
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))
WHEN 4 THEN CAST(’00:’
+ LEFT(RIGHT(next_run_time,4),2)
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))
WHEN 5 THEN CAST(’0′ + LEFT(RIGHT(next_run_time,5),1)
+’:’ + LEFT(RIGHT(next_run_time,4),2)
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))
WHEN 6 THEN CAST(LEFT(RIGHT(next_run_time,6),2)
+’:’ + LEFT(RIGHT(next_run_time,4),2)
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))
END,’NA’) AS DATETIME) ELSE ’01/01/1900 00:00:00′ END
,CONVERT(XML,[ExtensionSettings]).value(‘(//ParameterValue/Value[../Name=&quot;TO&quot;])[1]‘,’nvarchar(50)’) AS [To]
,CONVERT(XML,[ExtensionSettings]).value(‘(//ParameterValue/Value[../Name=&quot;Subject&quot;])[1]‘,’nvarchar(50)’) AS [Subject]
,CONVERT(XML,[ExtensionSettings]).value(‘(//ParameterValue/Value[../Name=&quot;RenderFormat&quot;])[1]‘,’nvarchar(50)’) AS [Render Format]
—Example report parameters: StartDateMacro, EndDateMacro &amp; Currency.
,CONVERT(XML,[Parameters]).value(‘(//ParameterValue/Value[../Name=&quot;StartDateMacro&quot;])[1]‘,’nvarchar(50)’) AS [Start Date]
,CONVERT(XML,[Parameters]).value(‘(//ParameterValue/Value[../Name=&quot;EndDateMacro&quot;])[1]‘,’nvarchar(50)’) AS [End Date]
,CONVERT(XML,[Parameters]).value(‘(//ParameterValue/Value[../Name=&quot;Currency&quot;])[1]‘,’nvarchar(50)’) AS [Currency]
,[LastRunTime]
,S.[ModifiedDate]
,[LastStatus]
,[DeliveryExtension]
,[Version]
,[InactiveFlags]
FROM
ReportServer.dbo.[Subscriptions] S
INNER JOIN ReportServer.dbo.ReportSchedule R ON S.SubscriptionID = R.SubscriptionID
INNER JOIN CATALOG C ON R.ReportID = C.ItemID
INNER JOIN msdb.dbo.sysjobs J ON CONVERT(nvarchar(128),R.ScheduleID) = J.name
INNER JOIN msdb.dbo.sysjobschedules JS ON J.job_id = JS.job_id]]></description>
		<content:encoded><![CDATA[<p>Hi guys, someone can modify the ATIF Script in order to let me select between days in the column NextRunDate. The purpose of this modification is that I would like to check if in one specific date and time there won&#8217;t reports to executed, otherwise I could not restart the service.</p>
<p>SELECT DISTINCT<br />
–[Locale],<br />
C.Name AS ReportName<br />
,C.PATH AS ReportManagerPath<br />
,S.Description AS SubscriptionDescription<br />
,[EventType]<br />
,CASE WHEN j.enabled = 1 THEN ‘Enabled’ ELSE ‘Disabled’ END AS ScheduledJob<br />
,’NextRunDate’ = CASE WHEN J.enabled =1 THEN CAST(CASE next_run_date<br />
WHEN 0 THEN NULL<br />
ELSE<br />
SUBSTRING(CONVERT(VARCHAR(15),next_run_date),1,4) + ‘/’ +<br />
SUBSTRING(CONVERT(VARCHAR(15),next_run_date),5,2) + ‘/’ +<br />
SUBSTRING(CONVERT(VARCHAR(15),next_run_date),7,2)<br />
END + ‘ ‘ +<br />
ISNULL(CASE LEN(next_run_time)<br />
WHEN 3 THEN CAST(’00:0′<br />
+ LEFT(RIGHT(next_run_time,3),1)<br />
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))<br />
WHEN 4 THEN CAST(’00:’<br />
+ LEFT(RIGHT(next_run_time,4),2)<br />
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))<br />
WHEN 5 THEN CAST(’0′ + LEFT(RIGHT(next_run_time,5),1)<br />
+’:’ + LEFT(RIGHT(next_run_time,4),2)<br />
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))<br />
WHEN 6 THEN CAST(LEFT(RIGHT(next_run_time,6),2)<br />
+’:’ + LEFT(RIGHT(next_run_time,4),2)<br />
+’:’ + RIGHT(next_run_time,2) AS CHAR(8))<br />
END,’NA’) AS DATETIME) ELSE ’01/01/1900 00:00:00′ END<br />
,CONVERT(XML,[ExtensionSettings]).value(‘(//ParameterValue/Value[../Name=&#8221;TO&#8221;])[1]‘,’nvarchar(50)’) AS [To]<br />
,CONVERT(XML,[ExtensionSettings]).value(‘(//ParameterValue/Value[../Name=&#8221;Subject&#8221;])[1]‘,’nvarchar(50)’) AS [Subject]<br />
,CONVERT(XML,[ExtensionSettings]).value(‘(//ParameterValue/Value[../Name=&#8221;RenderFormat&#8221;])[1]‘,’nvarchar(50)’) AS [Render Format]<br />
—Example report parameters: StartDateMacro, EndDateMacro &amp; Currency.<br />
,CONVERT(XML,[Parameters]).value(‘(//ParameterValue/Value[../Name=&#8221;StartDateMacro&#8221;])[1]‘,’nvarchar(50)’) AS [Start Date]<br />
,CONVERT(XML,[Parameters]).value(‘(//ParameterValue/Value[../Name=&#8221;EndDateMacro&#8221;])[1]‘,’nvarchar(50)’) AS [End Date]<br />
,CONVERT(XML,[Parameters]).value(‘(//ParameterValue/Value[../Name=&#8221;Currency&#8221;])[1]‘,’nvarchar(50)’) AS [Currency]<br />
,[LastRunTime]<br />
,S.[ModifiedDate]<br />
,[LastStatus]<br />
,[DeliveryExtension]<br />
,[Version]<br />
,[InactiveFlags]<br />
FROM<br />
ReportServer.dbo.[Subscriptions] S<br />
INNER JOIN ReportServer.dbo.ReportSchedule R ON S.SubscriptionID = R.SubscriptionID<br />
INNER JOIN CATALOG C ON R.ReportID = C.ItemID<br />
INNER JOIN msdb.dbo.sysjobs J ON CONVERT(nvarchar(128),R.ScheduleID) = J.name<br />
INNER JOIN msdb.dbo.sysjobschedules JS ON J.job_id = JS.job_id</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links Naji</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-3234</link>
		<dc:creator><![CDATA[Links Naji]]></dc:creator>
		<pubDate>Wed, 11 Jun 2014 19:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-3234</guid>
		<description><![CDATA[amazing! thanks for sharing :)]]></description>
		<content:encoded><![CDATA[<p>amazing! thanks for sharing <img src="http://thinknook.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Atif</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-3233</link>
		<dc:creator><![CDATA[Atif]]></dc:creator>
		<pubDate>Wed, 11 Jun 2014 14:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-3233</guid>
		<description><![CDATA[Hey,

I&#039;ve updated the code to also look at enabled and disabled schedules. Many thanks for this query ;-):

SELECT DISTINCT
 --[Locale],
 C.Name AS ReportName
 ,C.PATH AS ReportManagerPath
 ,S.Description AS SubscriptionDescription
 ,[EventType]
 ,CASE WHEN j.enabled = 1 THEN &#039;Enabled&#039; ELSE &#039;Disabled&#039; END AS ScheduledJob
 ,&#039;NextRunDate&#039; = CASE WHEN J.enabled =1 THEN CAST(CASE next_run_date
 WHEN 0 THEN NULL
 ELSE
 SUBSTRING(CONVERT(VARCHAR(15),next_run_date),1,4) + &#039;/&#039; +
 SUBSTRING(CONVERT(VARCHAR(15),next_run_date),5,2) + &#039;/&#039; +
 SUBSTRING(CONVERT(VARCHAR(15),next_run_date),7,2)
 END + &#039; &#039; +
 ISNULL(CASE LEN(next_run_time)
 WHEN 3 THEN CAST(&#039;00:0&#039;
 + LEFT(RIGHT(next_run_time,3),1)
 +&#039;:&#039; + RIGHT(next_run_time,2) AS CHAR(8))
 WHEN 4 THEN CAST(&#039;00:&#039;
 + LEFT(RIGHT(next_run_time,4),2)
 +&#039;:&#039; + RIGHT(next_run_time,2) AS CHAR(8))
 WHEN 5 THEN CAST(&#039;0&#039; + LEFT(RIGHT(next_run_time,5),1)
 +&#039;:&#039; + LEFT(RIGHT(next_run_time,4),2)
 +&#039;:&#039; + RIGHT(next_run_time,2) AS CHAR(8))
 WHEN 6 THEN CAST(LEFT(RIGHT(next_run_time,6),2)
 +&#039;:&#039; + LEFT(RIGHT(next_run_time,4),2)
 +&#039;:&#039; + RIGHT(next_run_time,2) AS CHAR(8))
 END,&#039;NA&#039;) AS DATETIME) ELSE &#039;01/01/1900 00:00:00&#039; END
 ,CONVERT(XML,[ExtensionSettings]).value(&#039;(//ParameterValue/Value[../Name=&quot;TO&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) AS [To]
 ,CONVERT(XML,[ExtensionSettings]).value(&#039;(//ParameterValue/Value[../Name=&quot;Subject&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) AS [Subject]
 ,CONVERT(XML,[ExtensionSettings]).value(&#039;(//ParameterValue/Value[../Name=&quot;RenderFormat&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) AS [Render Format]
 ---Example report parameters: StartDateMacro, EndDateMacro &amp; Currency.
 ,CONVERT(XML,[Parameters]).value(&#039;(//ParameterValue/Value[../Name=&quot;StartDateMacro&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) AS [Start Date]
 ,CONVERT(XML,[Parameters]).value(&#039;(//ParameterValue/Value[../Name=&quot;EndDateMacro&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) AS [End Date]
 ,CONVERT(XML,[Parameters]).value(&#039;(//ParameterValue/Value[../Name=&quot;Currency&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) AS [Currency]
 ,[LastRunTime]
 ,S.[ModifiedDate]
 ,[LastStatus]
 ,[DeliveryExtension]
 ,[Version]
 ,[InactiveFlags]
FROM 
ReportServer.dbo.[Subscriptions] S 
INNER JOIN ReportServer.dbo.ReportSchedule R ON S.SubscriptionID = R.SubscriptionID
INNER JOIN CATALOG C ON R.ReportID = C.ItemID
 INNER JOIN msdb.dbo.sysjobs J ON CONVERT(nvarchar(128),R.ScheduleID) = J.name
 INNER JOIN msdb.dbo.sysjobschedules JS ON J.job_id = JS.job_id]]></description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>I&#8217;ve updated the code to also look at enabled and disabled schedules. Many thanks for this query ;-):</p>
<p>SELECT DISTINCT<br />
 &#8211;[Locale],<br />
 C.Name AS ReportName<br />
 ,C.PATH AS ReportManagerPath<br />
 ,S.Description AS SubscriptionDescription<br />
 ,[EventType]<br />
 ,CASE WHEN j.enabled = 1 THEN &#8216;Enabled&#8217; ELSE &#8216;Disabled&#8217; END AS ScheduledJob<br />
 ,&#8217;NextRunDate&#8217; = CASE WHEN J.enabled =1 THEN CAST(CASE next_run_date<br />
 WHEN 0 THEN NULL<br />
 ELSE<br />
 SUBSTRING(CONVERT(VARCHAR(15),next_run_date),1,4) + &#8216;/&#8217; +<br />
 SUBSTRING(CONVERT(VARCHAR(15),next_run_date),5,2) + &#8216;/&#8217; +<br />
 SUBSTRING(CONVERT(VARCHAR(15),next_run_date),7,2)<br />
 END + &#8216; &#8216; +<br />
 ISNULL(CASE LEN(next_run_time)<br />
 WHEN 3 THEN CAST(&#8217;00:0&#8242;<br />
 + LEFT(RIGHT(next_run_time,3),1)<br />
 +':&#8217; + RIGHT(next_run_time,2) AS CHAR(8))<br />
 WHEN 4 THEN CAST(&#8217;00:&#8217;<br />
 + LEFT(RIGHT(next_run_time,4),2)<br />
 +':&#8217; + RIGHT(next_run_time,2) AS CHAR(8))<br />
 WHEN 5 THEN CAST(&#8216;0&#8242; + LEFT(RIGHT(next_run_time,5),1)<br />
 +':&#8217; + LEFT(RIGHT(next_run_time,4),2)<br />
 +':&#8217; + RIGHT(next_run_time,2) AS CHAR(8))<br />
 WHEN 6 THEN CAST(LEFT(RIGHT(next_run_time,6),2)<br />
 +':&#8217; + LEFT(RIGHT(next_run_time,4),2)<br />
 +':&#8217; + RIGHT(next_run_time,2) AS CHAR(8))<br />
 END,&#8217;NA&#8217;) AS DATETIME) ELSE &#8217;01/01/1900 00:00:00&#8242; END<br />
 ,CONVERT(XML,[ExtensionSettings]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;TO&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) AS [To]<br />
 ,CONVERT(XML,[ExtensionSettings]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;Subject&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) AS [Subject]<br />
 ,CONVERT(XML,[ExtensionSettings]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;RenderFormat&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) AS [Render Format]<br />
 &#8212;Example report parameters: StartDateMacro, EndDateMacro &amp; Currency.<br />
 ,CONVERT(XML,[Parameters]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;StartDateMacro&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) AS [Start Date]<br />
 ,CONVERT(XML,[Parameters]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;EndDateMacro&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) AS [End Date]<br />
 ,CONVERT(XML,[Parameters]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;Currency&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) AS [Currency]<br />
 ,[LastRunTime]<br />
 ,S.[ModifiedDate]<br />
 ,[LastStatus]<br />
 ,[DeliveryExtension]<br />
 ,[Version]<br />
 ,[InactiveFlags]<br />
FROM<br />
ReportServer.dbo.[Subscriptions] S<br />
INNER JOIN ReportServer.dbo.ReportSchedule R ON S.SubscriptionID = R.SubscriptionID<br />
INNER JOIN CATALOG C ON R.ReportID = C.ItemID<br />
 INNER JOIN msdb.dbo.sysjobs J ON CONVERT(nvarchar(128),R.ScheduleID) = J.name<br />
 INNER JOIN msdb.dbo.sysjobschedules JS ON J.job_id = JS.job_id</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-544</link>
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 28 Aug 2012 10:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-544</guid>
		<description><![CDATA[Thanks Sergio!]]></description>
		<content:encoded><![CDATA[<p>Thanks Sergio!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-543</link>
		<dc:creator><![CDATA[Sergio]]></dc:creator>
		<pubDate>Tue, 28 Aug 2012 01:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-543</guid>
		<description><![CDATA[I found the query quite useful, however it was missing the report name and the location to make it easy to identify. I have modified the query to include those items:

SELECT
c.[Path],
c.[Name],
[Locale],
[InactiveFlags],
&#039;Next Run Date&#039; = CASE next_run_date
WHEN 0 THEN null
ELSE
substring(convert(varchar(15),next_run_date),1,4) + &#039;/&#039; +
substring(convert(varchar(15),next_run_date),5,2) + &#039;/&#039; +
substring(convert(varchar(15),next_run_date),7,2)
END,
&#039;Next Run Time&#039; = isnull(CASE len(next_run_time)
WHEN 3 THEN cast(&#039;00:0&#039;
+ Left(right(next_run_time,3),1)
+&#039;:&#039; + right(next_run_time,2) as char (8))
WHEN 4 THEN cast(&#039;00:&#039;
+ Left(right(next_run_time,4),2)
+&#039;:&#039; + right(next_run_time,2) as char (8))
WHEN 5 THEN cast(&#039;0&#039; + Left(right(next_run_time,5),1)
+&#039;:&#039; + Left(right(next_run_time,4),2)
+&#039;:&#039; + right(next_run_time,2) as char (8))
WHEN 6 THEN cast(Left(right(next_run_time,6),2)
+&#039;:&#039; + Left(right(next_run_time,4),2)
+&#039;:&#039; + right(next_run_time,2) as char (8))
END,&#039;NA&#039;),
Convert(XML,[ExtensionSettings]).value(&#039;(//ParameterValue/Value[../Name=&quot;TO&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) as [To]
,Convert(XML,[ExtensionSettings]).value(&#039;(//ParameterValue/Value[../Name=&quot;RenderFormat&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) as [Render Format]
,Convert(XML,[ExtensionSettings]).value(&#039;(//ParameterValue/Value[../Name=&quot;Subject&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) as [Subject]
---Example report parameters: StartDateMacro, EndDateMacro &amp; Currency.
,Convert(XML,[Parameters]).value(&#039;(//ParameterValue/Value[../Name=&quot;StartDateMacro&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) as [Start Date]
,Convert(XML,[Parameters]).value(&#039;(//ParameterValue/Value[../Name=&quot;EndDateMacro&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) as [End Date]
,Convert(XML,[Parameters]).value(&#039;(//ParameterValue/Value[../Name=&quot;Currency&quot;])[1]&#039;,&#039;nvarchar(50)&#039;) as [Currency]
,s.[ModifiedDate]
,[LastStatus]
,[EventType]
,[LastRunTime]
,[DeliveryExtension]
,[Version]
FROM
ReportServer.dbo.[Subscriptions] S
INNER JOIN ReportServer.dbo.ReportSchedule R ON S.SubscriptionID = R.SubscriptionID
INNER JOIN msdb.dbo.sysjobs J ON Convert(nvarchar(128),R.ScheduleID) = J.name
INNER JOIN msdb.dbo.sysjobschedules JS ON J.job_id = JS.job_id
LEFT JOIN [ReportServer].[dbo].[Catalog] C on R.[ReportID]= c.ItemID]]></description>
		<content:encoded><![CDATA[<p>I found the query quite useful, however it was missing the report name and the location to make it easy to identify. I have modified the query to include those items:</p>
<p>SELECT<br />
c.[Path],<br />
c.[Name],<br />
[Locale],<br />
[InactiveFlags],<br />
&#8216;Next Run Date&#8217; = CASE next_run_date<br />
WHEN 0 THEN null<br />
ELSE<br />
substring(convert(varchar(15),next_run_date),1,4) + &#8216;/&#8217; +<br />
substring(convert(varchar(15),next_run_date),5,2) + &#8216;/&#8217; +<br />
substring(convert(varchar(15),next_run_date),7,2)<br />
END,<br />
&#8216;Next Run Time&#8217; = isnull(CASE len(next_run_time)<br />
WHEN 3 THEN cast(&#8217;00:0&#8242;<br />
+ Left(right(next_run_time,3),1)<br />
+':&#8217; + right(next_run_time,2) as char (8))<br />
WHEN 4 THEN cast(&#8217;00:&#8217;<br />
+ Left(right(next_run_time,4),2)<br />
+':&#8217; + right(next_run_time,2) as char (8))<br />
WHEN 5 THEN cast(&#8216;0&#8242; + Left(right(next_run_time,5),1)<br />
+':&#8217; + Left(right(next_run_time,4),2)<br />
+':&#8217; + right(next_run_time,2) as char (8))<br />
WHEN 6 THEN cast(Left(right(next_run_time,6),2)<br />
+':&#8217; + Left(right(next_run_time,4),2)<br />
+':&#8217; + right(next_run_time,2) as char (8))<br />
END,&#8217;NA&#8217;),<br />
Convert(XML,[ExtensionSettings]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;TO&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) as [To]<br />
,Convert(XML,[ExtensionSettings]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;RenderFormat&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) as [Render Format]<br />
,Convert(XML,[ExtensionSettings]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;Subject&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) as [Subject]<br />
&#8212;Example report parameters: StartDateMacro, EndDateMacro &amp; Currency.<br />
,Convert(XML,[Parameters]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;StartDateMacro&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) as [Start Date]<br />
,Convert(XML,[Parameters]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;EndDateMacro&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) as [End Date]<br />
,Convert(XML,[Parameters]).value(&#8216;(//ParameterValue/Value[../Name=&#8221;Currency&#8221;])[1]&#8217;,&#8217;nvarchar(50)&#8217;) as [Currency]<br />
,s.[ModifiedDate]<br />
,[LastStatus]<br />
,[EventType]<br />
,[LastRunTime]<br />
,[DeliveryExtension]<br />
,[Version]<br />
FROM<br />
ReportServer.dbo.[Subscriptions] S<br />
INNER JOIN ReportServer.dbo.ReportSchedule R ON S.SubscriptionID = R.SubscriptionID<br />
INNER JOIN msdb.dbo.sysjobs J ON Convert(nvarchar(128),R.ScheduleID) = J.name<br />
INNER JOIN msdb.dbo.sysjobschedules JS ON J.job_id = JS.job_id<br />
LEFT JOIN [ReportServer].[dbo].[Catalog] C on R.[ReportID]= c.ItemID</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-46</link>
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 19 Oct 2011 10:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-46</guid>
		<description><![CDATA[Ah, my bad.

I forgot to join on the &quot;&lt;b&gt;Subscriptions&lt;/b&gt;&quot; table in the SSRS Catalogue DB.

I have edited the script above to include that table.

Thank you for flagging the issue!]]></description>
		<content:encoded><![CDATA[<p>Ah, my bad.</p>
<p>I forgot to join on the &#8220;<b>Subscriptions</b>&#8221; table in the SSRS Catalogue DB.</p>
<p>I have edited the script above to include that table.</p>
<p>Thank you for flagging the issue!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ceduljko</title>
		<link>http://thinknook.com/query-ssrs-report-schedules-2011-06-26/#comment-45</link>
		<dc:creator><![CDATA[Ceduljko]]></dc:creator>
		<pubDate>Wed, 19 Oct 2011 09:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://thinknook.com/?p=49#comment-45</guid>
		<description><![CDATA[Which version of SSRS is this indended for?

Msg 207, Level 16, State 1, Line 25
Invalid column name &#039;ExtensionSettings&#039;.
Msg 207, Level 16, State 1, Line 26
Invalid column name &#039;ExtensionSettings&#039;.
Msg 207, Level 16, State 1, Line 27
Invalid column name &#039;ExtensionSettings&#039;.
Msg 207, Level 16, State 1, Line 29
Invalid column name &#039;Parameters&#039;.
Msg 207, Level 16, State 1, Line 30
Invalid column name &#039;Parameters&#039;.
Msg 207, Level 16, State 1, Line 31
Invalid column name &#039;Parameters&#039;.
Msg 207, Level 16, State 1, Line 32
Invalid column name &#039;ModifiedDate&#039;.
Msg 207, Level 16, State 1, Line 33
Invalid column name &#039;LastStatus&#039;.
Msg 207, Level 16, State 1, Line 34
Invalid column name &#039;EventType&#039;.
Msg 207, Level 16, State 1, Line 35
Invalid column name &#039;LastRunTime&#039;.
Msg 207, Level 16, State 1, Line 36
Invalid column name &#039;DeliveryExtension&#039;.
Msg 207, Level 16, State 1, Line 37
Invalid column name &#039;Version&#039;.]]></description>
		<content:encoded><![CDATA[<p>Which version of SSRS is this indended for?</p>
<p>Msg 207, Level 16, State 1, Line 25<br />
Invalid column name &#8216;ExtensionSettings&#8217;.<br />
Msg 207, Level 16, State 1, Line 26<br />
Invalid column name &#8216;ExtensionSettings&#8217;.<br />
Msg 207, Level 16, State 1, Line 27<br />
Invalid column name &#8216;ExtensionSettings&#8217;.<br />
Msg 207, Level 16, State 1, Line 29<br />
Invalid column name &#8216;Parameters&#8217;.<br />
Msg 207, Level 16, State 1, Line 30<br />
Invalid column name &#8216;Parameters&#8217;.<br />
Msg 207, Level 16, State 1, Line 31<br />
Invalid column name &#8216;Parameters&#8217;.<br />
Msg 207, Level 16, State 1, Line 32<br />
Invalid column name &#8216;ModifiedDate&#8217;.<br />
Msg 207, Level 16, State 1, Line 33<br />
Invalid column name &#8216;LastStatus&#8217;.<br />
Msg 207, Level 16, State 1, Line 34<br />
Invalid column name &#8216;EventType&#8217;.<br />
Msg 207, Level 16, State 1, Line 35<br />
Invalid column name &#8216;LastRunTime&#8217;.<br />
Msg 207, Level 16, State 1, Line 36<br />
Invalid column name &#8216;DeliveryExtension&#8217;.<br />
Msg 207, Level 16, State 1, Line 37<br />
Invalid column name &#8216;Version&#8217;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/


Served from: thinknook.com @ 2026-04-15 01:53:15 by W3 Total Cache
-->