I have the below custom report that shows each computer and the software installed on them. It also shows the last logged-on user for each computer.
I want to add a column to the report that also shows the "Employee ID" for the last logged-on user of each computer. I know the "Employee ID" is in tblADusers, but I can't figure out how to join that table to the report to achieve what I'm trying to do.
My report-building knowledge is somewhat limited, so any insight would be very appreciated.
Here's my existing report:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblAssets.Description,
tblAssets.Username,
tblAssets.Userdomain,
tblAssetCustom.Model,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber As Serial,
tblAssets.IPAddress As [IP Address],
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssets.Lastseen,
tblAssets.Firstseen,
tsysIPLocations.IPLocation,
tblSoftwareUni.softwareName,
tsysOS.OSname,
tblSoftware.softwareVersion
From tblAssets
Left Outer Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblAssetCustom.State = 1
Order By tblAssets.AssetID