Category and Associated accounts

Category and Associated accounts

Query to find categories and its associated accounts

Query:

SELECT categorydefinition.CATEGORYNAME"Category", 
(case when accountdefinition.ORG_NAME is NULL then 'ALL Accounts' else accountdefinition.ORG_NAME end)"Associated Accounts" FROM categorydefinition
LEFT JOIN categoryaccountmapping ON (categoryaccountmapping.CATEGORYID = categorydefinition.CATEGORYID)
LEFT JOIN accountdefinition ON (categoryaccountmapping.ACCOUNTID = accountdefinition.ORG_ID)
order by 1

Krishna Bharat

ServiceDesk Plus - MSP support team

                New to ADSelfService Plus?