---
title: SQL-028: US_CLAIM_UNIT update
summary: US_CLAIM_UNIT update used by clsClaimUnit.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.UnitStat
reference_type: package
---

# SQL-028: US_CLAIM_UNIT update

This SQL statement implements the `US_CLAIM_UNIT update` data-access path for `clsClaimUnit` in `SAIF.Business.UnitStat`. It participates in the `update` lifecycle handled by `BeforeUpdate`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-028 |
| **Operation type** | Update |
| **Execution method** | Inline |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsClaimUnit` |
| **Criteria property** | `UpdateSQL` |
| **Lifecycle method** | `BeforeUpdate` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:ActiveUnitFlag` | Input | String | 1 | Active/inactive unit flag. |
| `:ValueCode` | Input | String | 1 | Claim unit valuation code. |
| `:UpdateUser` | Input | String/SmartString | 30 | User ID written to audit columns or used as a filter. |
| `:UpdateDate` | Input | Date/SmartDate | N/A | Audit timestamp written during insert or update. |
| `:UpdateNumber` | Input | Decimal | N/A | Optimistic concurrency/version counter. |
| `:ReportedClosedFlag` | Input | String | 1 | Tracks whether the claim has already been reported closed. |
| `:ReportedFatalFlag` | Input | String | 1 | Tracks whether the claim has already been reported fatal. |
| `:FinalDenialDate` | Input | SmartDate | N/A | Final denial date for the claim unit. |
| `:PreferredWorkerFlag` | Input | String | 1 | Preferred worker indicator. |
| `:ClaimID` | Input | Decimal/SmartDecimal | N/A | Claim identifier bound from the business object or criteria. |
| `:PolicyUnitSeqNum` | Input | Decimal/SmartDecimal | N/A | Policy unit primary key / parent foreign key. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [US_CLAIM_UNIT](../database-tables.md#us-claim-unit) | UPDATE | See sample SQL |

## Sample SQL

```sql

Update US_CLAIM_UNIT

Set ACTIVE_UNIT_FLAG      = :ActiveUnitFlag,

    VALUE_CODE            = :ValueCode,

    UPDATE_USER           = :UpdateUser,

    UPDATE_DATE           = :UpdateDate,

    UPDATE_NUM            = :UpdateNumber,

    REPORTED_FATAL_FLAG   = :ReportedFatalFlag,

    REPORTED_CLOSED_FLAG  = :ReportedClosedFlag,

    FINAL_DENIAL_DATE     = :FinalDenialDate,

    PREFERRED_WORKER_FLAG = :PreferredWorkerFlag

Where US_CLAIM_UNIT.US_POLICY_UNIT_SEQ_NUM = :PolicyUnitSeqNum

  and US_CLAIM_UNIT.CLAIM_ID = :ClaimID

```

## Operations and processes

- [Claim unit maintenance](../operations/claim-unit-maintenance.md)

## Business rules

- [BR-US-002: Claim unit policy unit sequence number must be greater than zero](../business-rules.md#br-us-002-claim-unit-policy-unit-sequence-number-must-be-greater-than-zero)
- [BR-US-003: Claim unit claim ID must be greater than zero](../business-rules.md#br-us-003-claim-unit-claim-id-must-be-greater-than-zero)
- [BR-US-020: Database contention on update or delete is detected by checking RowsAffected <> 1](../business-rules.md#br-us-020-database-contention-on-update-or-delete-is-detected-by-checking-rowsaffected-1)

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

## Sources

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