:::: MENU ::::

Using Machine – OutPut :-User Name,AD site code,AD discoverd date,Active Client,Client Status,Obsolete Client,HW SCAN DIFFERENCE

SELECT Name0 AS [Machine Name], User_Name0 AS [User Name],AD_site_name0 as [AD site code] ,creation_date0 as [AD discoverd date],
CASE Active0 WHEN ‘0’ THEN ‘InActive’ WHEN ‘1’ THEN ‘Active’ ELSE ‘Unknown’ END AS [Active Client],

CASE Client0 WHEN ‘0’ THEN ‘No’ WHEN ‘1’ THEN ‘Yes’ ELSE ‘Unknown’ END AS [Client Status],

CASE obsolete0 WHEN ‘0’ THEN ‘No’ WHEN ‘1’ THEN ‘Yes’ ELSE ‘Unknown’ END AS [Obsolete Client], DATEDIFF(D,V_GS_WORKSTATION_STATUS.LASTHWSCAN,GETDATE()) AS [HW SCAN DIFFERENCE]

FROM v_R_System LEFT JOIN V_GS_WORKSTATION_STATUS ON V_R_SYSTEM.RESOURCEID = V_GS_WORKSTATION_STATUS.RESOURCEID

WHERE (Name0 IN (‘XXXXX’,’SSS’))


So, what do you think ?