---
title: SQL-032: US_AUDIT_CONDITION delete by policy period and edit type
summary: US_AUDIT_CONDITION delete by policy period and edit type used by clsAuditConditionCollection.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.UnitStat
reference_type: package
---

# SQL-032: US_AUDIT_CONDITION delete by policy period and edit type

This SQL statement implements the `US_AUDIT_CONDITION delete by policy period and edit type` data-access path for `clsAuditConditionCollection` in `SAIF.Business.UnitStat`. It participates in the `delete` lifecycle handled by `DeletePolicyPeriodAuditsByEditType`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-032 |
| **Operation type** | Delete |
| **Execution method** | Inline |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsAuditConditionCollection` |
| **Criteria property** | `N/A (direct helper SQL)` |
| **Lifecycle method** | `DeletePolicyPeriodAuditsByEditType` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PolicyNumber` | Input | Decimal | N/A | SAIF policy number. |
| `:PolicyPeriodEffectiveDate` | Input | Date | N/A | Policy period effective date. |
| `:EditTypeCode` | Input | String | 5 | Audit classification code such as policy, exposure, or claim. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [US_AUDIT_CONDITION](../database-tables.md#us-audit-condition) | DELETE | See sample SQL |
| [US_POLICY_UNIT](../database-tables.md#us-policy-unit) | DELETE | See sample SQL |

## Sample SQL

```sql

DELETE us_audit_condition

WHERE us_policy_unit_seq_num in (

    SELECT us_policy_unit_seq_num

    FROM   us_policy_unit pun

    WHERE  pun.policy_num = :PolicyNumber

    AND    pun.policy_period_eff_date = :PolicyPeriodEffectiveDate

)

AND edit_type_code = :EditTypeCode

```

## Operations and processes

- [Audit condition maintenance](../operations/audit-condition-maintenance.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources

- `Business\SAIF.Business.UnitStat\clsAuditConditionCollection.vb`
