Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Cobra7
Champion Sweeper
This should be simple but I'm not having any luck.

Searching for SmcGui.exe. I confirmed it is showing up in tblfilevserions but when makeing a report I either get nothing or everything. The report is to tell me who does NOT have it.

This is modified from the Adobe 9 post a while back:

SELECT TOP 100 PERCENT 
dbo.tblComputers.Computername AS Computer,
dbo.tblComputers.Username,
dbo.tblComputers.Lastseen
FROM
dbo.tblComputers
WHERE
computername NOT IN (SELECT DISTINCT dbo.tblComputers.Computername FROM dbo.tblComputers, dbo.tblfileversions WHERE dbo.tblFileVersions.FilePathfull LIKE '%SmcGui.exe%')
ORDER BY
dbo.tblComputers.Computername


However it also shows PC's that have it. Little help please? 🙂
2 REPLIES 2
Cobra7
Champion Sweeper
Seems to be working now, I used:
SELECT TOP 100 PERCENT 
dbo.tblComputers.Computername AS Computer,
dbo.tblComputers.Username,
dbo.tblComputers.Lastseen
FROM
dbo.tblComputers
WHERE
computername NOT IN (SELECT DISTINCT dbo.tblComputers.Computername FROM dbo.tblfileversions INNER JOIN dbo.tblComputers ON (dbo.tblfileversions.Computername = dbo.tblComputers.Computername) WHERE dbo.tblFileVersions.FilePathfull LIKE '%SmcGui.exe%')
ORDER BY
dbo.tblComputers.Computername


The INNER JOIN seemed to be my problem.

Something that may help a bit is a way to filter out the PC's that are having errors (about 8% of our PC's can't be scanned for one reason or another, not a LS problem). If anyone has the code it would help, otherwise no big deal, I'll work it out when I have more time.
Hemoco
Lansweeper Alumni
Looks ok.

Could you post the output of query (SELECT DISTINCT dbo.tblComputers.Computername FROM dbo.tblComputers, dbo.tblfileversions WHERE dbo.tblFileVersions.FilePathfull LIKE '%SmcGui.exe%')

Most likely it's a problem with NULL values.

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now