‎06-19-2024 10:03 AM
Hello,
I am creating a chart report of the installed patches on corporate client PCs.
I want to exclude spare computers from this report, so I am using the custom field 2. If it contains any string that machine is exluded from the report.
It works, but I have an issue in the report when the string contained in custom 2 is deleted, because in this case I see 2 different lines in the report for the same quickfix, one is for those computers where the custom 2 was never filled in, and one for those where it was filled in and then deleted.
In the report I used:
tblAssetCustom.Custom2 Is Null Or tblAssetCustom.Custom2 Like ''
and it looks like null or like '' are not equal, and I wish them to be merged in the same line in the report. Is it possible? I can put my report here if needed.
Thanks
Sandro
‎06-19-2024 11:18 AM
IsNull(tblAssetCustom.Custom2, '') = ''
‎06-19-2024 11:16 AM
Show full report code
‎06-19-2024 11:33 AM
Hi Mister Nobody,
here is my code.
Thank you for the support!
Select Top 1000000 sub1.lastPatch As [Last installed patch],
Count(tblAssets.AssetID) As Total,
tblOperatingsystem.Version,
tsysOS.OSname As OS
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join (Select Top 1000000 Max(tblQuickFixEngineeringUni.HotFixID) As
lastPatch,
tblQuickFixEngineering.AssetID
From tblQuickFixEngineering
Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID =
tblQuickFixEngineering.QFEID
Group By tblQuickFixEngineering.AssetID) As sub1 On sub1.AssetID =
tblAssets.AssetID
Inner Join tblOperatingsystem On
tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where sub1.lastPatch Is Not Null And tsysOS.OSname Not Like 'Win 7' And
(tblAssetCustom.Custom2 Is Null Or tblAssetCustom.Custom2 Like '') And
tblAssetCustom.State = 1 And tblAssets.AssetName Like 'blq%' And
tblAssets.Assettype = -1
Group By tblAssetCustom.Custom2,
sub1.lastPatch,
tblOperatingsystem.Version,
tsysOS.OSname
Order By OS Desc,
tblOperatingsystem.Version Desc,
[Last installed patch] Desc
‎06-19-2024 11:12 AM - edited ‎06-19-2024 11:15 AM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now