---
title: "SQL-051: Retrieve cancel reason override"
summary: "Retrieve cancel reason override"
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Core
reference_type: package
---

# SQL-051: Retrieve cancel reason override

Retrieve cancel reason override in the context of `clsCancelReasonOverride`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-051 |
| **Operation type** | Read |
| **Execution method** | CommandType.Text / DataRequestType.Scalar |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsCancelReasonOverride` |
| **Criteria property** | `*n/a - application layer*` |
| **Lifecycle method** | `clsCancelReasonOverride.OriginalCarrierChangeReasonCode (application layer)` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PolicyNumber` | Input | bound from `inPolicyNumber` | - | Bound in `clsCancelReasonOverride.GetCancelReasonOverride` (line 449) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CANCELLATION](../database-tables.md#cancellation) | SELECT | See sample SQL |
| [CARRIER_CHANGE_REASON_CODE](../database-tables.md#carrier_change_reason_code) | SELECT | See sample SQL |

## Sample SQL

```sql
SELECT
 (
      SELECT
        CODE || ' - ' || CODE_DESCR
      FROM
        CARRIER_CHANGE_REASON_CODE C
      WHERE
        C.CODE = A.CARRIER_CHANGE_REASON_CODE
    )
FROM
  CANCELLATION A
WHERE
  A.CANCELLATION_SEQ_NUM = (
      SELECT
        Max(CANCELLATION_SEQ_NUM)
      FROM
        CANCELLATION B
      WHERE
        B.POLICY_NUM = :PolicyNumber
        AND B.CANCELLATION_SEQ_NUM = A.CANCELLATION_SEQ_NUM
    )
  AND (A.REINSTATE_UPDATE_DATE IS NULL And A.RESCIND_UPDATE_DATE IS NULL)
```

## Operations and processes
- [Record a cancellation reason override](../operations/record-a-cancellation-reason-override.md)

## Business rules
- [BR-009: A cancellation reason override must carry a valid](../business-rules.md#br-009-a-cancellation-reason-override-must-carry-a-valid)
- [BR-033: New sequence values for writable entities are obtained](../business-rules.md#br-033-new-sequence-values-for-writable-entities-are-obtained)

> **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.Core\clsCancelReasonOverride.vb`
