cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Sandro
Engaged Sweeper II

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

4 REPLIES 4
Mister_Nobody
Honored Sweeper II

IsNull(tblAssetCustom.Custom2, '') = ''

Mister_Nobody
Honored Sweeper II

Show full report code 

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