Query that lists the templates associated to a particular service approver:

Query that lists the templates associated to a particular service approver:

PGSQL:

select aaau.first_name "Service Approver",rtl.templatename "Associated Service Template"  from SERVICETEMPACCMAPPING stm inner join TEMPACCTOAPPROVEMAPPING tam on stm.TEMPACCMAPID=tam.TEMPACCMAPID inner join ESCALATETOMEDIATOR em on tam.ESCALATETOID=em.ESCALATETOID inner join  ESCALATETON eo on em.ESCALATETOID=eo.ESCALATETOID left join requesttemplate_list rtl ON stm.templateid=rtl.templateid LEFT JOIN sduser sdu ON eo.userid=sdu.userid left join aaauser aaau ON sdu.userid=aaau.user_id where aaau.first_name='guest' group by 1,2 order by 1


Note:   Kindly replace the service approver name (in the highlighted text) with the one as per your requirement to get the desired results. This query will list the service approvers of both requesters and technicians.



                New to ADSelfService Plus?