Notification

Icon
Error

Software Missing Report - Trying to run report that shows all machines missing software. Works fine when only Windows 10.

Posted: Friday, December 6, 2019 3:02:27 PM(UTC)
Dannnnooo

Dannnnooo

Member Original PosterPosts: 1
0
Like
Hi

I have the following query. It works fine when i change the query to show only Windows 10 (shows they are missing the software), but when i add Windows 7 machines, it shows machines that have the software installed on it! Any ideas? Thanks

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tsysOS.OSname
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where (tblAssets.AssetID Not In (Select Top 1000000 tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%Netskope%') And
tsysOS.OSname = 'win 10') Or
(tsysOS.OSname = 'win 7')
Order By tblAssets.AssetName
RC62N
#1RC62N Member Posts: 455  
posted: 12/6/2019 6:09:28 PM(UTC)
Check what you're saying in your WHERE clause.
Code:
Where
  ( tblAssets.AssetID Not In (Select Top 1000000
                                tblSoftware.AssetID
                              From
                                tblSoftware
                                Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
                              Where
                                tblSoftwareUni.softwareName Like '%Netskope%')
    And tsysOS.OSname = 'win 10'
  )
  Or (tsysOS.OSname = 'win 7')

(The computer is running Win10 and is missing the software)
OR (The computer is running Win7, don't care about whether or not the software is present)

Change it to
Code:
Where
  tblAssets.AssetID Not In (Select Top 1000000
                              tblSoftware.AssetID
                            From
                              tblSoftware
                              Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
                            Where
                              tblSoftwareUni.softwareName Like '%Netskope%')
  And (tsysOS.OSname = 'win 10' Or tsysOS.OSname = 'win 7')

(The computer is running either Win10 or Win7) and is missing the software.

Or, if you prefer
Code:
  And tsysOS.OSname IN ('win 10', 'win 7')

Active Discussions

Lansweeper Count of each browser installed
by  AllSeeingEye   Go to last post Go to first unread
Last post: Yesterday at 2:44:48 PM(UTC)
Lansweeper Custom Reports Email Question
by  muffintopman  
Go to last post Go to first unread
Last post: Yesterday at 1:57:58 PM(UTC)
Lansweeper Windows Update Setting Report
by  Brandon   Go to last post Go to first unread
Last post: 8/11/2020 5:11:45 PM(UTC)
Lansweeper Customized Printer Toner Report
by  Cripple.Zero  
Go to last post Go to first unread
Last post: 8/10/2020 9:08:00 PM(UTC)
Lansweeper Pages printed in the last 30 days
by  RC62N   Go to last post Go to first unread
Last post: 8/10/2020 5:18:05 PM(UTC)
Lansweeper Report for a percentage of calls closed within SLA
by  mouaad  
Go to last post Go to first unread
Last post: 8/10/2020 3:45:58 PM(UTC)
Lansweeper Report for tickets closed per agent last week
by  MLeman   Go to last post Go to first unread
Last post: 8/10/2020 9:55:39 AM(UTC)
Lansweeper Software List by Computer/Server Name
by  nnewton  
Go to last post Go to first unread
Last post: 8/7/2020 6:56:47 AM(UTC)