05/04/2023 09:03 PM
Hello Team,
We are trying to get the count of all entitlements and entitlement owner details by using below query.
But we are getting wrong count for one of the application. with the same query we are able to get the correct count for other applications.
we are trying for or Active Directory group application, the actual count is 1lack above but we are getting 56k+ count which is not the correct count. with the same query for other apps getting correct count.
Kindly let us know is there any limit for us to get full result or check the query if we are doing anything wrong.
Query
=======
select ev.entitlement_value as 'entitlement name', u.username as 'owner ID', u.displayname as 'owner name', case when u.statuskey = '0' then 'Inactive Owner' else 'Owner Active' end as 'Owner status'
from
users u
left join
entitlement_owners eo
on eo.userkey = u.userkey
left join
entitlement_values ev
on ev.entitlement_valuekey = eo.entitlement_valuekey
left join
entitlement_types et
on ev.ENTITLEMENTTYPEKEY = et.ENTITLEMENTTYPEKEY
left join
endpoints ep
on et.endpointkey = ep.endpointkey
where ep.endpointkey = 17;
Thanks,
Srividya
05/04/2023 09:44 PM
Can you please check if all the owners are actualluy assigned to entitlement?
Reason : In case the owner are not mapped to entitlement that particular enttilement is not showing up with your query
05/04/2023 10:13 PM
select ev.entitlement_value as 'entitlement name', u.username as 'owner ID', u.displayname as 'owner name', case when u.statuskey = '0' then 'Inactive Owner' else 'Owner Active' end as 'Owner status'
from
entitlement_values ev
,endpoints ep
,entitlement_types et
,users u ,entitlement_owners eo
where eo.userkey = u.userkey and ev.entitlement_valuekey = eo.entitlement_valuekey
and ev.ENTITLEMENTTYPEKEY = et.ENTITLEMENTTYPEKEY
and et.endpointkey = ep.endpointkey
and ep.endpointkey = 12;
05/05/2023 08:49 AM
Below is the solution:
Thanks