cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sebouh
Engaged Sweeper
It looks like the query for report "Error: DNS error" has an error.

The query currently reads:

SELECT TOP (1000000) dbo.tblerrors.Computername, dbo.tblComputers.ComputerUnique, dbo.tblerrors.ErrorText, MAX(dbo.tblerrors.Lastchanged)
AS [Last changed]
FROM dbo.tblerrors INNER JOIN
dbo.tblComputers ON dbo.tblerrors.Computername = dbo.tblComputers.Computername INNER JOIN
dbo.web40ActiveComputers ON dbo.tblComputers.Computername = dbo.web40ActiveComputers.Computername
GROUP BY dbo.tblerrors.Computername, dbo.tblComputers.ComputerUnique, dbo.tblerrors.ErrorText
HAVING (dbo.tblerrors.ErrorText = 'like %dns redirected%')
ORDER BY [Last changed] DESC


but it should be:

SELECT TOP (1000000) dbo.tblerrors.Computername, dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain, dbo.tblerrors.ErrorText, MAX(dbo.tblerrors.Lastchanged)
AS [Last changed]
FROM dbo.tblerrors INNER JOIN
dbo.tblComputers ON dbo.tblerrors.Computername = dbo.tblComputers.Computername INNER JOIN
dbo.web40ActiveComputers ON dbo.tblComputers.Computername = dbo.web40ActiveComputers.Computername
GROUP BY dbo.tblerrors.Computername, dbo.tblComputers.ComputerUnique, dbo.tblComputers.domain, dbo.tblerrors.ErrorText
HAVING (dbo.tblerrors.ErrorText like '%dns redirected%')
ORDER BY [Last changed] DESC

adding both the Domain column and correcting the HAVING clause. As written it doesn't return any values for me.

1 REPLY 1
Hemoco
Lansweeper Alumni
Thanks, will be fixed.