Question

2
Replies
151
Views
Close popover
Aditya Boggarapu (bogga)
PEGA
Solutions Engineer
Pegasystems Inc.
IN
bogga Member since 2015 28 posts
PEGA
Posted: April 12, 2018
Last activity: April 12, 2018
Closed

How to implement below query in RD

SELECT * FROM pegarules.pr4_rule_vw DRS where DRS.PYRULESET IN ('PegaCSFSM','PegaFSM',) AND DRS.pyRuleAvailable !='withdrawn' AND

(select COUNT(*) from pegarules.pr_index_reference IR INNER JOIN pegarules.pr4_rule_vw DR

ON

(DR.pxInsName=IR.pxReferencingInsName AND DR.pyClass=IR.pxInsIndexedClass AND DR.pyRuleSet=IR.pxReferencingRuleSetName

AND DR.pyRuleSetVersion=IR.pxReferencingRuleSetVersion AND IR.pyRuleName = DRS.pyRuleName AND IR.pxRuleObjClass=DRS.pyclass) where DR.pyRuleAvailable !='Withdrawn') = 0;

We are able to implement inner query

select COUNT(*) from pegarules.pr_index_reference IR INNER JOIN pegarules.pr4_rule_vw DR

ON

(DR.pxInsName=IR.pxReferencingInsName AND DR.pyClass=IR.pxInsIndexedClass AND DR.pyRuleSet=IR.pxReferencingRuleSetName

AND DR.pyRuleSetVersion=IR.pxReferencingRuleSetVersion AND IR.pyRuleName = DRS.pyRuleName AND IR.pxRuleObjClass=DRS.pyclass) where DR.pyRuleAvailable !='Withdrawn' easily in a single RD using inner join and COUNT function but how to implement the complete query

User Experience
Moderation Team has archived post