@Sengo Marimuthu
Thank you for posting in Microsoft Q&A forum.
We can replace "v_R_System" to "v_R_User" and replace "vAppDeploymentResultsPerClientMachine" to "vAppDeploymentResultsPerClientUser".
SELECT
us.Name0 AS 'User Name',
CASE
WHEN CAS.EnforcementState = '1000' THEN 'Success'
WHEN CAS.EnforcementState = '1001' THEN 'Already Compliant'
WHEN CAS.EnforcementState = '1002' THEN 'Simulate Success'
WHEN CAS.EnforcementState = '2000' THEN 'In progress'
END AS 'Status',
--CAS.EnforcementState AS ' Status',
CAS.LastModificationTime AS 'Last Status Date/Time',
CAS.Descript AS 'Advert ID'
FROM v_R_User us
JOIN vAppDeploymentResultsPerClientUser CAS ON us.ResourceID = CAS.ResourceID
Where
CAS.Descript LIKE '%' and Name0 IN ('XXXX',
'YYYY')
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.