SQL-027: Retrieve period rating context from WCIS and legacy tables
This document records the SQL used by clsPeriodRatingInfo in SAIF.Business.Policy.Rating.
Classification
Field
Value
SQL ID
SQL-027
Operation type
Read
Execution method
Application method — text (direct class SQL)
Database
Oracle
Schema
[unqualified]**
Command type
Text
Business object
clsPeriodRatingInfo
Criteria property
N/A — non-Criteria class SQL
Lifecycle method
GetPeriodRatingInfo / GetCurrentPeriodRatingInfo
Parameters
Parameter
Direction
Type
Max length
Description
:PolicyNumber
Input
Not specified
not specified
Bound parameter.
:PolicyPeriodEffectiveDate
Input
Not specified
not specified
Bound parameter.
Tables
Table
Access
Columns used
POLICY
SELECT
See sample SQL and source for column usage.
POLICY_PERIOD
SELECT
See sample SQL and source for column usage.
POLICY_PERIOD_NON_WCIS
SELECT
See sample SQL and source for column usage.
Sample SQL
SELECT
pp . anniversary_rate_date as AnniversaryRatingDate ,
p . market_type_code as MarketTypeCode ,
pp . ard_extension_flag as ARDExtensionFlag ,
pp . policy_period_eff_date as EffectiveDate ,
pp . policy_period_exp_date as ExpirationDate ,
pp . risk_type_code as RateTierCode
FROM
policy p ,
policy_period pp
WHERE
p . policy_num = : PolicyNumber
AND p . policy_num = pp . policy_num
AND pp . policy_period_eff_date = : PolicyPeriodEffectiveDate
UNION
SELECT
pp . anniversary_rate_date as AnniversaryRatingDate ,
p . market_type_code as MarketTypeCode ,
pp . ard_extension_flag as ARDExtensionFlag ,
pp . policy_period_eff_date as EffectiveDate ,
pp . policy_period_exp_date as ExpirationDate ,
pp . risk_type_code as RateTierCode
FROM
policy p ,
policy_period_non_wcis pp
WHERE
p . policy_num = : PolicyNumber
AND p . policy_num = pp . policy_num
AND pp . policy_period_eff_date = : PolicyPeriodEffectiveDate
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.Rating\clsPeriodRatingInfo.vb:145-243