Query to list Service Request Approver and Purchase Request Approver (MSSQL & PGSQL)

Query to list Service Request Approver and Purchase Request Approver (MSSQL & PGSQL)

Tested in Build PGSQL (14300) or MSSQL (14306)

Select aau.first_name "Name", po.approverstatus "Purchase Request Approver", sr.approverstatus "Service Request Approver", adef.org_name "Account" from aaauser aau
left join POApproverDetails po on po.approver=aau.user_id
left join SRApproverDetails sr on sr.APPROVER=aau.USER_ID
left join sduser su on su.userid=aau.user_id
left join accountdefinition adef on adef.pocid=su.userid where sr.APPROVERSTATUS='True' or po.APPROVERSTATUS='True' Order by 4

                  New to ADSelfService Plus?