Skip to content

SQL-009: Retrieve maximum premium history set id

Retrieve the latest eligible premium-history set.

Classification

Field Value
SQL ID SQL-009
Operation type Read
Execution method Inline SQL
Database Oracle
Schema [unqualified]**
Command type Text
Business object N/A (Application layer)
Criteria property N/A
Lifecycle method MaxPremiumHistorySetId

Parameters

| Parameter | Direction | Type | Max length | Description | | :PolicyNumber | Input | NUMBER | N/A | Policy number. | | :PolicyPeriodEffectiveDate | Input | DATE | N/A | Policy period effective date. |

Tables

Table Access Columns used
PREM_HIST_SUMMARY SELECT PREM_HIST_SET_ID, POLICY_NUM, POLICY_PERIOD_EFF_DATE, PREM_HIST_TYPE_CODE

Sample SQL

select
  max(prem_hist_set_id)
from prem_hist_summary phs
where phs.policy_num = :PolicyNumber
  and phs.policy_period_eff_date = :PolicyPeriodEffectiveDate
  and phs.prem_hist_type_code in ('1','3')

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\PolicyInformation.vb