
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 02:10 PM
Hey! I'm trying to make a report that shows the following: AssetName, Model, Manufacturer, SerialNumber, SystemSKU, Description (from AD) and Last Login (Displayname). The problem is that it does not show MAC computers when Description and Displayname are included. What have I done wrong?
"
Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber,
tblAssetCustom.SystemSKU,
tblADComputers.Description,
tblADusers.Displayname
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADComputers.Description <> tblADusers.Displayname
Where (tblAssets.AssetName Like 'SUB%') Or
(tblAssets.AssetName Like 'SUS%')
"
"
Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber,
tblAssetCustom.SystemSKU,
tblADComputers.Description,
tblADusers.Displayname
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADComputers.Description <> tblADusers.Displayname
Where (tblAssets.AssetName Like 'SUB%') Or
(tblAssets.AssetName Like 'SUS%')
"
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
‎03-12-2018 09:17 PM
The descriptions of tblADUsers and tblADComputers in the database documentation are clear about their storing Windows-domain users' and computers' attributes. Try replacing the INNER JOINs on the tblADxxx tables LEFT JOINs.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 09:17 PM
The descriptions of tblADUsers and tblADComputers in the database documentation are clear about their storing Windows-domain users' and computers' attributes. Try replacing the INNER JOINs on the tblADxxx tables LEFT JOINs.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 08:52 PM
start by removing the where clause. does that return data (it did for me)
then it is likely in your where condition (s)
If you can provide some examples of asset names you want in the report and some that you do not want in (they can be fake ones that met your criteria) then I can probably help you more.
then it is likely in your where condition (s)
If you can provide some examples of asset names you want in the report and some that you do not want in (they can be fake ones that met your criteria) then I can probably help you more.
