When I run this, the first name, last name, and display name columns come out blank. I know they're not blank. I'm surprised I can't link tblADusers to tblAssets by username. Anyone know why? Thanks in advance!
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Username,
tblSoftwareUni.softwareName,
tblAssetCustom.State,
tblADusers.Firstname,
tblADusers.Lastname
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Left Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join tblADObjects On tblADObjects.ADObjectID = tblADComputers.ADObjectID
And tblADObjects.ADObjectID = tblADComputers.ManagerADObjectId
Left Join tblADusers On tblADObjects.ADObjectID = tblADusers.ADObjectID And
tblADObjects.ADObjectID = tblADusers.ManagerADObjectId
Where tblSoftwareUni.softwareName Like 'SOLIDWORKS 2017 SP04.1' And
tblAssetCustom.State = 1