Need help with a simple task.....
So i haven't done SCCM in over 2 years, they let the SCCM guy go and now I have some SQL from Quest that we need to run in SCCM. Oh yeah and my knowledge in SQL is shit.
I created a query and pasted the language in but when i run it it says invalid view. When i created the query I left the object type as System Resource and then pasted in the query language.
Any help is greatly appreciated.
SELECT DISTINCT
v_R_System.Netbios_Name0,
v_R_System.Operating_System_Name_and0,
v_GS_WORKSTATION_STATUS.LastHWScan,
v_GS_LastSoftwareScan.LastScanDate
FROM v_R_System
LEFT JOIN v_GS_LastSoftwareScan on v_R_System.ResourceID = v_GS_LastSoftwareScan.ResourceID
LEFT JOIN v_GS_WORKSTATION_STATUS on v_R_System.ResourceID = v_GS_WORKSTATION_STATUS.ResourceID
ORDER BY v_R_System.Netbios_Name0
Posted Aug 22, 2019, 10:51 AM UTC
You're trying to run that in a SCCM query? You need to translate it from SQL views to WQL classes instead.
v_R_System is SMS_R_SYSTEM, v_GS_Workstation_Status is SMS_G_SYSTEM_WORKSTATION_STATUS, etc.