Hey;
Thanks for your input.
What i try to applomplish is:
1) Get the rule criteria:
SQL SQLORA PREPARE SQLOUT FOR
select * from rules
;
END
TABLE FILE SQLOUT
PRINT
ROLENAME
CONDITIONLOGIC
ATTRIBUTE
ATTRIBUTEVALUE
HEADING
"Rule Definition"
WHERE ROLENAME EQ '&RoleNm.Select Role Name.';
2) I need to query via another schema to calcalate how many persons got included based on pre-defined rule.
ENGINE SQLORA SET DEFAULT_CONNECTION SRM
SQL SQLORA PREPARE SQLOUT FOR
select * from icsynergy.aps_account where acct_user_id in
(
select attr_user_id from icsynergy.aps_attribute
where
(attr_key = 'location' and attr_value='BKK')
intersect
select attr_user_id from icsynergy.aps_attribute
where (attr_key = 'department' and attr_value='IA')
intersect
select attr_user_id from icsynergy.aps_attribute
where rule = rule-criteria
;
END
SET NODATA = ' '
DEFINE FILE SQLOUT
the number of rule-criteria will vary based on the first query.
for example:
(attr_key = 'employeeGroup' and attr_value='IFN')
(attr_key = 'costCenter' and attr_value ='0016')
)
Regards
-Maria
====================
Production: WebFOCUS 7.1.1 on Window 2003
WebFOCUS 7.1.1 Client on HP-UX on WebLOGIC 8.1 sp4
Dev: WebFOCUS 7.6.4 on Window 2003
WebFOCUS 7.1.1 Client on HP-UX on WebLogic 8.1 sp4