Query to show Site and its related settings(MSSQL & PGSQL)

Query to show Site and its related settings(MSSQL & PGSQL)

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


Go to Reports-New Query Report and execute the query.


select adef.org_name "Account Name",sdef.siteid "Site ID", sdo.name "Site Name", siteconf.settingdetail "Related Settings", CASE WHEN (siteconf.configid) = 1 THEN 'Operational hours' WHEN (siteconf.configid) = 2 THEN 'Holidays' WHEN (siteconf.configid) = 3 THEN 'Departments' WHEN (siteconf.configid) = 4 THEN 'Support Groups' WHEN (siteconf.configid) = 7 THEN 'Technicians / Site Association' WHEN (siteconf.configid) = 5 THEN ' Business Rules' WHEN (siteconf.configid) = 6 THEN ' Service Level Agreements' ELSE 'Common' END "Related Settings Identifier" from sitedefinition sdef left join sdorganization sdo on sdo.org_id=sdef.siteid left join siteconfigsettings siteconf on siteconf.siteid=sdef.siteid left join accountsitemapping asm on asm.siteid=sdef.siteid left join accountdefinition adef on adef.org_id=asm.accountid where sdef.isdeleted='false' order by 1 
        New to ADManager Plus?

          New to ADSelfService Plus?