Notification

Icon
Error

Change processes report to show opposite results - Trying to get all PCs w/o this running process

Posted: Monday, June 29, 2020 7:43:28 PM(UTC)
William382

William382

Member Original PosterPosts: 25
0
Like
I found the below script in the forum:
Quote:
Select Top 1000 tblAssets.AssetName,
tblProcesses.Caption
From tblAssets
Inner Join tblProcesses On tblAssets.AssetID = tblProcesses.AssetID
Where tblProcesses.Caption = 'OneDrive.exe'


https://www.lansweeper.c...ng-report.aspx#post59508

I want to change it to where I can see any PCs NOT running OneDrive. I'm trying to get certainty this process is running org wide and ensure it sends a weekly email if we have some down. You know, for syncing stuff.

I tried modifying the last line with a NOT, but that didn't work. How can I make this show only PC without this process.
Where NOT tblProcesses.Caption = 'OneDrive.exe'
I could do a compare column in excel with what the output is of the above, but I'd like to all canned up nicely in a report.

Thank you!
RC62N
#1RC62N Member Posts: 440  
posted: 6/29/2020 9:38:46 PM(UTC)
You've run into a "do what I mean, not what I say" situation. By NOT-ing your WHERE condition, you're basically saying "show me everything except OneDrive.exe".

Try this instead:
Code:
Select Top 1000
  tblAssets.AssetName
From
  tblAssets
Where
   NOT EXISTS (SELECT tblProcesses.AssetID
               FROM tblProcesses
               WHERE tblProcesses.Caption = 'OneDrive.exe'
                 AND tblProcesses.AssetID = tblAssets.AssetID)

If you remove the NOT on this, it should return the same asset list as your original query.

In this case, the sub-SELECT is pulling a list of assets that include the OneDrive.exe process, then the main SELECT is saying "show me a list of assets that aren't in that list".

Active Discussions

Lansweeper Software audit with installation date
by  RC62N   Go to last post Go to first unread
Last post: 7/3/2020 3:39:41 PM(UTC)
Lansweeper Duplicates (3-4) in report please helppppp!
by  AlexMZetec  
Go to last post Go to first unread
Last post: 7/2/2020 3:15:16 PM(UTC)
Lansweeper Report to find all computers with no logon data
by  Andy.S  
Go to last post Go to first unread
Last post: 7/2/2020 9:55:53 AM(UTC)
Lansweeper Change processes report to show opposite results
by  RC62N   Go to last post Go to first unread
Last post: 6/29/2020 9:38:46 PM(UTC)
Lansweeper Keep link to items when using column names
by  Tom Galvin  
Go to last post Go to first unread
Last post: 6/27/2020 12:16:03 AM(UTC)
Lansweeper Reporting on low HDD space for 2 servers
by  Samuel1222   Go to last post Go to first unread
Last post: 6/26/2020 8:32:47 PM(UTC)
Lansweeper Report to find out which local users are present
by  chart  
Go to last post Go to first unread
Last post: 6/26/2020 9:01:52 AM(UTC)