Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/12/2022 01:17 PM
Hi Team,
Can somebody please help how to query out to get details for child and parent entitlement together in Single Query as mentioned in the below screen-shot?
Solved! Go to Solution.
04/12/2022 02:50 PM
Hello,
Where are you looking to get this information onto a single view? Child entitlements will directly be shown under entitlement hierarchy for an account as below :
Regards,
Sahaj
04/12/2022 02:50 PM
Hi Sahaj,
We expecting SQL Query to get the information for child and parent entitlement together in Single query and we using below query but it is not working as expected:
select ev.entitlement_value as parentent from entitlement_values ev, entitlements2 e
where ev.ENTITLEMENT_VALUEKEY = e.ENTITLEMENT_VALUE1KEY and e.ENTITLEMENT_VALUE2KEY = '28'
Regards,
Parthiban S
04/12/2022 02:50 PM
Hello Parthiban,
The query you have written seem to be correct to pull in all the parent entitlements that is tied to your child entitlement whose entValKey is 28.
Regards,
Avinash Chhetri
04/12/2022 02:50 PM
Hi Parthiban,
You can try something like the below query :
Select distinct parent.entitlement_value as parentEntitlement,child.ENTITLEMENT_VALUE as childEntitlement
from entitlement_values parent
join entitlements2 ev2 on parent.ENTITLEMENT_VALUEKEY=ev2.ENTITLEMENT_VALUE1KEY
join entitlement_values child on child.ENTITLEMENT_VALUEKEY=ev2.ENTITLEMENT_VALUE2KEY
where parent.entitlementtypekey=20
Always ensure you limit the dataset by adding the appropriate where clause else the data would be huge and might cause issues. In the above example, i have made the query send parent child entitlements where the parent entitlement is always of a particular entitlement type.
Regards,
Sahaj