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

Installer Windows 10 Upgrade
by  CyberCitizen  
Go to last post Go to first unread
Last post: 7/8/2020 1:07:47 AM(UTC)
Installer Installer - Microsoft Office
by  Florian_Eigsi   Go to last post Go to first unread
Last post: 6/29/2020 3:33:20 PM(UTC)
Installer Firefox ESR 68.8.0 MSI Installer
by  PLSJohnJohn  
Go to last post Go to first unread
Last post: 5/11/2020 4:33:50 PM(UTC)
Installer Update Chrome browser with GoogleUpdate.exe ?
by  Inna Ptushkina   Go to last post Go to first unread
Last post: 5/4/2020 8:39:29 PM(UTC)
Installer Bios Update for Dell all in one
by  Florian_Eigsi  
Go to last post Go to first unread
Last post: 4/2/2020 11:36:43 AM(UTC)
Installer Uninstall - Adobe Acrobat 9x
by  palemmo   Go to last post Go to first unread
Last post: 3/25/2020 7:25:05 PM(UTC)
Installer OneDrive Silent Install
by  Steven.C  
Go to last post Go to first unread
Last post: 3/13/2020 2:55:19 PM(UTC)