Unanswered: SQL Query only works in the afternoon?
Okay. I am at a loss on this one. Below is the code that I am running to view all scheduled subscriptions in my SSRS. But it only works later in the day. I do however see new subscriptions I set up before they run. Any ideas?
SELECT DISTINCT c.Name AS RptName,
sc.Name AS SchedName,
su.LastRunTime AS SubLast,
sc.LastRunTime AS SchedLast,
MinutesInterval as MinInt,
DaysInterval as DaysInt,
WeeksInterval as WeeksInt,
FROM dbo.Catalog AS c INNER JOIN
dbo.ReportSchedule AS rs ON c.ItemID = rs.ReportID INNER JOIN
dbo.Schedule AS sc ON rs.ScheduleID = sc.ScheduleID INNER JOIN
dbo.Subscriptions AS su ON rs.SubscriptionID = su.SubscriptionID
WHERE sc.NextRunTime > GetDate()