---
title: "SQL-042: clsImageIdx"
summary: Delete statement for clsImageIdx.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Business.Imaging
reference_type: package
---

# SQL-042: clsImageIdx

This statement is conditionally executed during `clsImageIdx.BeforeUpdate` as a secondary data request (`DR2`) to remove `IMAGE_EAIP` rows when the image's EAIP associations are cleared or when a formerly EAIP-associated image still has a persisted EAIP record.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-042 |
| **Operation type** | Delete |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text** |
| **Business object** | `clsImageIdx` |
| **Criteria property** | `DeleteEAIPSQL` |
| **Lifecycle method** | `BeforeUpdate (conditional DR2)` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:ImageSeqNum` | Input | [not specified]** | N/A | IMAGE_SEQ_NUM of the EAIP record to delete. |
| `:ClaimId` | Input | [not specified]** | N/A | Claim ID of the EAIP record. |
| `:EAIPPeriodSeq` | Input | [not specified]** | N/A | EAIP period sequence number (from current or original value). |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [IMAGE_EAIP](../database-tables.md#image_eaip) | DELETE | IMAGE_SEQ_NUM, CLAIM_ID, EAIP_PERIOD_SEQ_NUM |

## Sample SQL

```sql
Delete IMAGE_EAIP
Where IMAGE_SEQ_NUM = :ImageSeqNum
  AND CLAIM_ID = :ClaimId
  AND EAIP_PERIOD_SEQ_NUM = :EAIPPeriodSeq
```

## Operations and processes
- [Image indexing](../operations/image-indexing.md)

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

## Sources
- `Business\SAIF.Business.Imaging\clsImageIdx.vb`
