---
title: "SQL-053: 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-053: Retrieve cancel reason override

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

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-053 |
| **Operation type** | Read |
| **Execution method** | IDataRequest.SQLStatement (CommandType.Text) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsCancelReasonOverride` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve / AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:CancellationSeqNum` | Input | bound from `MyCriteria.CancellationSeqNum` | - | Bound in `clsCancelReasonOverride.BeforeRetrieve` (line 218) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CANCEL_REASON_OVERRIDE](../database-tables.md#cancel_reason_override) | SELECT | See sample SQL |

## Sample SQL

```sql
SELECT
  CANCEL_REASON_OVERRIDE_SEQ_NUM as CancelReasonOverrideSeqNum,
  CANCELLATION_SEQ_NUM as CancellationSeqNum,
  CANCEL_REASON_CODE as CancelReasonCode,
  CARRIER_CODE as CarrierCode,
  CARRIER_CHANGE_REASON_CODE as CarrierChangeReasonCode
FROM
  CANCEL_REASON_OVERRIDE A
WHERE
  CANCEL_REASON_OVERRIDE_SEQ_NUM = (
      SELECT
        Max(B.CANCEL_REASON_OVERRIDE_SEQ_NUM)
      FROM
        CANCEL_REASON_OVERRIDE B
      WHERE
        B.CANCELLATION_SEQ_NUM = A.CANCELLATION_SEQ_NUM
        AND B.CANCELLATION_SEQ_NUM = :CancellationSeqNum
    )
```

## 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`
