
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 09:06 PM
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:
This works well and results in about 2400+ machines. The next section has the code for the machines running Proxy Pro:
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.
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.
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 11:28 PM
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'
)
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-13-2016 11:27 PM
This worked. Thank you very much for your help.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2016 11:28 PM
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'
)
