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

I'm trying to build a report around the 'custom field 1' entry in Lansweeper Assets. Which I have named 'Asset Number' so we can populate with our own Asset numbers from our CMDB.

I've used the base report 'Asset Tags' and tweaked it to the below...

[size=3]Select Top 1000000 tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssets.AssetUnique,
tblAssetCustom.Custom1 As [Asset Number]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName[/size]



Can anyone suggest how I would get this Report to ONLY show data when the tblAssetCustom.Custom1 is blank?


Thanks!! 🙂
1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Add a condition to your WHERE clause:
  AND (tblAssetCustom.Custom1 = ''
OR tblAssetCustom.Custom1 IS NULL)

(Based on what I'm seeing in my tblAssetCustom, a "blank" custom field could be either blank or NULL, so check for either one to be true.)

View solution in original post

2 REPLIES 2
bluesymbol
Engaged Sweeper II
That does it! thank you 🙂

RCorbeil
Honored Sweeper II
Add a condition to your WHERE clause:
  AND (tblAssetCustom.Custom1 = ''
OR tblAssetCustom.Custom1 IS NULL)

(Based on what I'm seeing in my tblAssetCustom, a "blank" custom field could be either blank or NULL, so check for either one to be true.)