SQL-063: Read Pa Selection Rule Data
This statement supports the premium-audit library by read Pa Selection Rule Data.
Classification
Field
Value
SQL ID
SQL-063
Operation type
Read
Execution method
IDataRequest.SQLStatement (CommandType.Text)
Database
Oracle
Schema
[unqualified]**
Command type
Text
Business object
clsAuditSelectionTester
Criteria property
RetrieveSQL
Lifecycle method
BeforeRetrieve / AfterRetrieve
Parameters
Parameter
Direction
Type
Max length
Description
:PATypeCode
Input
bound from MyCriteria.PremiumAuditTypeCode
5
Bound in clsAuditSelectionTester.OpenReader (line 173)
:SelectionCategoryCode
Input
bound from MyCriteria.SelectionCategoryCode
5
Bound in clsAuditSelectionTester.OpenReader (line 174)
:MarketTypeCode
Input
bound from MyCriteria.MarketTypeCode
5
Bound in clsAuditSelectionTester.OpenReader (line 175)
:ReasonCode
Input
bound from MyCriteria.ReasonCode
5
Bound in clsAuditSelectionTester.OpenReader (line 176)
:AuditDate
Input
bound from MyCriteria.AuditDate
—
Bound in clsAuditSelectionTester.OpenReader (line 177)
Tables
Sample SQL
SELECT
PA_SELECTION_RULE_ID as RuleID ,
METHOD_NAME as MethodName
FROM
PA_SELECTION_RULE SR
JOIN
PA_SLCTN_CAT_MKT_TYPE_RSN_RULE SCMTRR USING ( PA_SELECTION_RULE_ID )
JOIN
PA_SLCTN_CATEGORY_MARKET_TYPE SCM USING ( PA_SELECTION_CATEGORY_CODE , MARKET_TYPE_CODE , PA_TYPE_CODE )
WHERE
PA_TYPE_CODE = : PATypeCode
AND PA_SELECTION_CATEGORY_CODE = : SelectionCategoryCode
AND MARKET_TYPE_CODE = : MarketTypeCode
AND PA_REASON_CODE = : ReasonCode
AND (
( POLICY_EFF_RULE_FLAG = 'N'
AND sysdate between Rule_eff_date and nvl ( rule_exp_date - 1 , sysdate + 1 ))
OR
( POLICY_EFF_RULE_FLAG = 'Y'
AND : AuditDate between Rule_eff_date and nvl ( rule_exp_date - 1 , : AuditDate + 1 )))
ORDER BY
PA_SELECTION_RULE_ID
Operations and processes
Business rules
Note: Statements marked with * were inferred from code structure, naming conventions, or
contextual evidence where direct confirmation was not available in source artifacts. Statements
marked with ** could not be confirmed; treat as unknown until verified.
Sources
Business/SAIF.Business.Policy.Audit.Premium/clsAuditSelectionTester.vb:1153