List all PCs without a DVD

This SQL query will, list all PCs without a DVD

SELECT Distinct
 v_GS_COMPUTER_SYSTEM.Name0 AS ‘PC Name’,
 v_GS_COMPUTER_SYSTEM.UserName0 AS ‘User Name’
FROM
 v_GS_COMPUTER_SYSTEM v_GS_COMPUTER_SYSTEM
WHERE
 v_GS_COMPUTER_SYSTEM.ResourceID not in (SELECT Distinct v_GS_CDROM.ResourceID  FROM  v_GS_CDROM v_GS_CDROM  WHERE v_GS_CDROM.DeviceID0 Like ‘%DVD%’)

Leave a Reply

Your email address will not be published. Required fields are marked *