I grabbed a WSUS report that was posted here, nice report. To turn it to a chart I made a new report that needs to query that existing report. the control seems to save them as DB views, web50rep..... some ID value I am guessing.
when I try to query them, the query tool does not like it at all however, SQK server has ZERO issues with it, so it is NOT a sql syntax thing, it is in the control or its settings. Is there a way to configure the control (like an xml file) I can update or a setting in the web.config?
Select Case
When [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate >= DateAdd(day, -7,
GetDate()) Then '1. less than a week'
When [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate < DateAdd(day, -7,
GetDate()) And [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate >= DateAdd(day,
-30, GetDate()) Then '2. less than a month'
When [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate < DateAdd(day, -31,
GetDate()) And [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate >= DateAdd(day,
-90, GetDate()) Then '3. less than 3 months' Else '4. more than 3 months'
End As DateRange,
count(*) As NumberOfAssets
From [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7]
Where [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].OSname In ('Win 7', 'Win 8', 'Win 8.1',
'Win 10')
Group By Case
When [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate >= DateAdd(day, -7,
GetDate()) Then '1. less than a week'
When [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate < DateAdd(day, -7,
GetDate()) And [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate >= DateAdd(day,
-30, GetDate()) Then '2. less than a month'
When [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate < DateAdd(day, -31,
GetDate()) And [lansweeperdb].[dbo].[web50rep0208b76934134852ae25ab3b26a4fbd7].lastPatchDate >= DateAdd(day,
-90, GetDate()) Then '3. less than 3 months' Else '4. more than 3 months'
End