Forum Reply – T-SQL Best Practice

SELECT DISTINCT
    ARP.DisplayName0,
    ARP.Publisher0,
    ARP.Version0,
    CS.Name0,
    CS.UserName0,
    WS.LastHWScan,
    BIOS.SerialNumber0,
    R.AD_Site_Name0
FROM
    dbo.v_GS_ADD_REMOVE_PROGRAMS ARP INNER JOIN dbo.v_GS_Computer_System CS ON ARP.ResourceID = CS.ResourceID
    INNER JOIN dbo.v_GS_PC_BIOS BIOS ON CS.ResourceID = BIOS.ResourceID
    INNER JOIN dbo.v_R_System R ON CS.ResourceID = R.ResourceID
    INNER JOIN dbo.v_GS_WORKSTATION_STATUS WS ON CS.ResourceID = WS.ResourceID
ORDER BY
    ARP.DisplayName0 ASC,
    CS.Name0 ASC,
    WS.LastHWScan DESC

Leave a Reply

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