---
title: "SQL-017: Check premium-history references before class delete"
summary: Check premium-history references before class delete
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Rating
reference_type: package
---

# SQL-017: Check premium-history references before class delete

This document records the SQL used by `clsManualClassBase` in `SAIF.Business.Policy.Rating`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-017 |
| **Operation type** | Read |
| **Execution method** | Application method — text |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsManualClassBase` |
| **Criteria property** | `N/A — non-Criteria method` |
| **Lifecycle method** | `CanDeleteManualClassBaseRecord` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:inManualClassNum` | Input | Not specified | not specified | Bound parameter. |
| `:inWCISRateFileSeqNum` | Input | Not specified | not specified | Bound parameter. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PREM_HIST_CLASS_COVERAGE](../database-tables.md#prem_hist_class_coverage) | SELECT | See sample SQL and source for column usage. |

## Sample SQL

```sql
select
  count(*)
from
  prem_hist_class_coverage
where
  manual_class_num = :inManualClassNum
  AND rate_file_seq_num = :inWCISRateFileSeqNum
```

## Operations and processes
- [Delete a manual class base with referential guard](../operations/delete-a-manual-class-base-with-referential-guard.md)

## Business rules
- [BR-004](../business-rules.md#br-004-a-manual-class-base-may-not-be-deleted-while-any-prem_hist_class_coverage-row-references-the-same-class-number-and-rate-file-sequence-number)
- [BR-005](../business-rules.md#br-005-a-failure-while-probing-delete-eligibility-is-surfaced-as-an-application-exception-carrying-the-frameworks-media-files-check-message)

> **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.Rating\clsManualClassBase.vb:1341-1383`