Video Screencast Help

Computers without a department or an owner

Created: 31 Jan 2014 • Updated: 31 Jan 2014
SK's picture
0 0 Votes
Login to vote

The following query will display those computer assets that either do not have a department or an owner associated with them:

SELECT vc.Name AS Computer,vado.Department,vauo.[User Name] AS [Owner]
FROM vComputer vc
LEFT JOIN vAssetUserOwner vauo ON vc.[Guid] = vauo._AssetGuid
LEFT JOIN vAssetDepartmentOwner vado ON vc.[Guid] = vado._AssetGuid
WHERE vado.Department IS NULL
OR vauo.[User Name] IS NULL
ORDER BY vc.Name ASC