04-29-2024 05:12 PM - last edited on 05-22-2024 09:13 AM by Riley
I am attempting to run a report pulling selected computers by running the below query. However, it is not including some of the computers that are in the query. I can search for the computer, that does not show up in the query, successfully. Is this to be expected? What am I missing here as to why some are not showing reports?
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tblassets.Username,
tblADusers.Displayname,
tblADusers.email,
tblassets.BuildNumber,
tblassets.Version
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join tblADusers On tblADusers.Username = tblassets.Username
Where (tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = '' Or
tblassets.AssetName = ''
)
05-03-2024 03:58 AM
Change "inner" to "left"
05-03-2024 02:45 PM
Same issue.
05-03-2024 03:39 PM
It looks like for tblADUsers, you have to join both the Username and Userdomain fields to tblAssets.
Inner Join tblADusers On tblADusers.Userdomain = tblassets.userdomain
The only other thing I can think of is removing the tblassetcustom join as it doesn't look like it's used anywhere.
05-02-2024 11:11 PM
Any help here? Or do I need to open a support ticket?
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now