
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 05:25 PM
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!! 🙂
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!! 🙂
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
‎05-27-2015 10:58 PM
Add a condition to your WHERE clause:
(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.)
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.)
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2015 10:53 AM
That does it! thank you 🙂
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2015 10:58 PM
Add a condition to your WHERE clause:
(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.)
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.)
