→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GMFDE
Engaged Sweeper III
I have two reports that I need to combine. The intent is that I need a single report that returns AssetName for every machine that has Internet Explorer 8 but not a second software product called "Proxy Pro Host". Each attempt I've made has resulted in either nothing in the report or 100,000+ returns. The first section here is the code for getting all the machines still running IE 8:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Username,
tblADusers.Displayname,
tblADusers.Title,
tblADusers.Department,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblRegistry.Regkey,
tblRegistry.Value
From tblAssets
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Right Outer Join tblADusers On tblADusers.Username = tblAssets.Username
Left Outer Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where
tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer' And tblRegistry.Value Like '%8.0%'


This works well and results in about 2400+ machines. The next section has the code for the machines running Proxy Pro:

From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblAssetCustom.State = 1 And tblSoftwareUni.softwareName =
'Proxy Pro Host'


This results in a report with 2300+ line items.

As stated, I need a report that shows me all machines still running IE 8 but are not running Proxy Pro

Any help would be greatly appreciated.
1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Try this.
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Username,
tblADusers.Displayname,
tblADusers.Title,
tblADusers.Department,
tblAssets.Lastseen,
tblAssets.Lasttried
FROM
tblAssets
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblSoftware ON tblSoftware.AssetID = tblAssets.AssetID
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
LEFT JOIN tblADusers ON tblADusers.Username = tblAssets.Username
WHERE
tblSoftwareUni.softwareName LIKE '%Internet Explorer%'
AND tblSoftwareUni.softwareName LIKE '% 8'
AND tblSoftwareUni.softwareName NOT LIKE 'Security Update%'
AND tblSoftwareUni.SoftwarePublisher LIKE 'Microsoft Corp%'
AND tblAssets.AssetID NOT IN ( SELECT
tblAssets.AssetID
FROM
tblAssets
INNER JOIN tblSoftware ON tblSoftware.AssetID = tblAssets.AssetID
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftwareUni.SoftwareName = 'Proxy Pro Host'
)

View solution in original post

2 REPLIES 2
GMFDE
Engaged Sweeper III
This worked. Thank you very much for your help.
RCorbeil
Honored Sweeper II
Try this.
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Username,
tblADusers.Displayname,
tblADusers.Title,
tblADusers.Department,
tblAssets.Lastseen,
tblAssets.Lasttried
FROM
tblAssets
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblSoftware ON tblSoftware.AssetID = tblAssets.AssetID
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
LEFT JOIN tblADusers ON tblADusers.Username = tblAssets.Username
WHERE
tblSoftwareUni.softwareName LIKE '%Internet Explorer%'
AND tblSoftwareUni.softwareName LIKE '% 8'
AND tblSoftwareUni.softwareName NOT LIKE 'Security Update%'
AND tblSoftwareUni.SoftwarePublisher LIKE 'Microsoft Corp%'
AND tblAssets.AssetID NOT IN ( SELECT
tblAssets.AssetID
FROM
tblAssets
INNER JOIN tblSoftware ON tblSoftware.AssetID = tblAssets.AssetID
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftwareUni.SoftwareName = 'Proxy Pro Host'
)