Skip to content

SQL-005: Retrieve interested parties by policy window

Retrieve interested parties for a policy and date window.

Classification

Field Value
SQL ID SQL-005
Operation type Read
Execution method Inline SQL composed from shared constants
Database Oracle
Schema [unqualified]**
Command type Text
Business object clsInterestedPartyCollection
Criteria property RetrieveSQL
Lifecycle method BeforeRetrieve / AfterRetrieve

Parameters

Parameter Direction Type Max length Description
:PolicyNumber Input Decimal (NUMBER) N/A Policy whose interested parties are listed.
:StartDate Input Date (DATE) N/A Window start date.
:EndDate Input Date (DATE) N/A Window end date.

Tables

Table Access Columns used
BUSINESS_AFFILIATE SELECT/JOIN policy number, effective/cancel dates, flags, title, duties, remuneration, ownership fields
AFFILIATE JOIN name columns, birth date, audit columns

Sample SQL

SELECT
  BA.AFFILIATE_SSN as AffiliateID,
  BA.POLICY_NUM as PolicyNumber,
  BA.BUS_SEQ_NUM as BusinessSequenceNumber,
  BA.AFFILIATE_EFF_DATE as EffectiveDate,
  BA.AFFILIATE_CANCEL_DATE as CancelDate,
  BA.AFFILIATE_TYPE_CODE as AffiliateTypeCode,
  BA.CREATE_DATE as CreateDate,
  BA.CREATE_USER as CreateUser,
  BA.UPDATE_DATE as UpdateDate,
  BA.UPDATE_USER as UpdateUser,
  BA.INSURED_CODE as InsuredCode,
  BA.AFFILIATE_DUTIES as Duties,
  BA.REMUNERATION as Remuneration,
  BA.OWNERSHIP_FLAG as OwnershipFlag,
  BA.PERCENT_OWNERSHIP as OwnershipPercent,
  BA.DIRECTOR_FLAG as DirectorFlag,
  BA.AFFILIATE_TITLE_CODE as TitleCode,
  BA.PERSONAL_ELECTION_NUM as PersonalElectionNumber,
  BA.OFFICER_OF_NOTICE_FLAG as OfficerOfNoticeFlag,
  A.AFFILIATE_FIRST_NAME as FirstName,
  A.AFFILIATE_INITIAL as MiddleInitial,
  A.AFFILIATE_LAST_NAME as LastName,
  A.AFFILIATE_SUFFIX as NameSuffix,
  A.AFFILIATE_DOB as BirthDate,
  A.CREATE_DATE as CreateDate,
  A.CREATE_USER as CreateUser,
  A.UPDATE_DATE as UpdateDate,
  A.UPDATE_USER as UpdateUser
FROM
  BUSINESS_AFFILIATE BA,
  AFFILIATE A
WHERE
  BA.AFFILIATE_TYPE_CODE = '1'
  AND BA.AFFILIATE_SSN = A.AFFILIATE_SSN
  AND BA.POLICY_NUM = :PolicyNumber
  AND BA.AFFILIATE_EFF_DATE < :EndDate
  AND nvl(BA.AFFILIATE_CANCEL_DATE, :StartDate + 1) > :StartDate
ORDER BY
  A.AFFILIATE_LAST_NAME,
  A.AFFILIATE_FIRST_NAME,
  A.AFFILIATE_INITIAL,
  A.AFFILIATE_SUFFIX

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.Affiliate\clsInterestedPartyCollection.vb