---
title: "SQL-020: Secondary policy status derivation"
summary: Derive the secondary cancellation and collection status.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-31
library: SAIF.Business.View.Policy
reference_type: package
---

# SQL-020: Secondary policy status derivation

`clsPolicyData` uses this statement to derive the secondary status shown next to a policy's primary status — the collection and cancellation condition. The Oracle function is wrapped in a `SELECT ... FROM DUAL` so that it can be executed through the standard data-portal read path.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-020 |
| **Operation type** | Read |
| **Execution method** | Inline SQL wrapping an Oracle function call |
| **Database** | Oracle |
| **Schema** | `[unqualified]`** |
| **Command type** | Text |
| **Business object** | `clsPolicyData` |
| **Criteria property** | `GetSecondaryPolicyStatusSQL` |
| **Lifecycle method** | `GetSecondaryPolicyStatus` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:in_policy_num` | Input | Decimal | not specified | Policy number whose derived cancellation/collection status is requested. |

## Tables

No table is referenced directly in the .NET source. The tables read by the procedure body reside in the Oracle database and are described under [sp72268_get_cancel_status](../procedures/sp72268_get_cancel_status.md).

## Sample SQL

```sql
select sp72268_get_cancel_status(:in_policy_num) from dual
```

## Operations and processes

- [Lazy-load policy detail](../operations/lazy-load-policy-detail.md)

> **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.View.Policy/clsPolicyData.vb`
