Need to merge two reports and I'm having difficulty to combine both to one report. One is Software Inventory Report with 3 different software's, and the other is when last time Microsoft patch was installed. Both has asset name, and Username as common shared fields, and we use Assetname to search / filter out certain computer. Thanks in advance!
Software Report:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Username,
tblADusers.email,
tblAssets.Domain,
tblSoftwareUni.softwareName As software,
tblSoftware.softwareVersion As version,
tblSoftwareUni.SoftwarePublisher As publisher,
tsysOS.Image As icon,
tblAssets.Lastseen,
tblADusers.OU
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADusers On tblADusers.Username = tblAssets.Username
Where (tblSoftwareUni.softwareName Like 'Trend Micro OfficeScan%') Or
(tblSoftwareUni.softwareName Like 'Pulse Secure 5.1%') Or
(tblSoftwareUni.softwareName Like 'Check Point Endpoint%' And
tblAssetCustom.State = 1)
Order By tblAssets.AssetName,
software,
version
-----------------------------------------------------------------------------------
Last Microsoft Patched Detected:
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tsysOS.OSname As [Operating System],
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
Max(tblQuickFixEngineering.Lastchanged) As LastPatchDetected
From tblAssets
Inner Join tblQuickFixEngineering On tblAssets.AssetID =
tblQuickFixEngineering.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID =
tblQuickFixEngineering.QFEID
Where tblAssetCustom.State = 1
Group By tsysOS.Image,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tsysOS.OSname,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen
Order By LastPatchDetected