---
title: "SQL-048: clsUserDenySelfRegistration"
summary: Update statement for clsUserDenySelfRegistration.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Business.External.Users
reference_type: package
---

# SQL-048: clsUserDenySelfRegistration

Updates an existing `EXT_USER_DENY_SELF_REG` block-list entry. The WHERE clause includes `AND update_num = :UpdateNum` per [BR-EU-05](../business-rules.md#br-eu-05-optimistic-concurrency-via-update_num).

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:CustomerRequested` | Input | String | 1 | Updated customer-requested flag. |
| `:SourceSystemGroupID` | Input | String | 30 | Customer group ID (composite key). |
| `:UserTypeCode` | Input | String | 5 | User type code (composite key). |
| `:Reason` | Input | String | 200 | Updated reason text. |
| `:UpdateUser` | Input | String | 30 | Username performing update. |
| `:UpdateDate` | Input | DateTime | N/A | Update timestamp. |
| `:UpdateNum` | Input | Decimal | N/A | Current optimistic-concurrency value. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [EXT_USER_DENY_SELF_REG](../database-tables.md#ext_user_deny_self_reg) | UPDATE | `CUSTOMER_REQUESTED_FLAG`, `CUSTOMER_GROUP_ID`, `EXT_USER_TYPE_CODE`, `REASON_TXT`, `UPDATE_USER`, `UPDATE_DATE`, `UPDATE_NUM` |

## Sample SQL

```sql
UPDATE EXT_USER_DENY_SELF_REG
SET CUSTOMER_REQUESTED_FLAG = :CustomerRequested,
    CUSTOMER_GROUP_ID = :SourceSystemGroupID,
    EXT_USER_TYPE_CODE = :UserTypeCode,
    REASON_TXT = :Reason,
    UPDATE_USER = :UpdateUser,
    UPDATE_DATE = :UpdateDate,
    UPDATE_NUM = :UpdateNum + 1
WHERE EXT_USER_DENY_SELF_REG.CUSTOMER_GROUP_ID = :SourceSystemGroupID
  AND EXT_USER_DENY_SELF_REG.EXT_USER_TYPE_CODE = :UserTypeCode
  AND update_num = :UpdateNum
```

## Operations and processes
- [Deny self-registration check](../operations/deny-self-registration-check.md)

## Business rules
- [BR-EU-02: Deny-self-registration block-list](../business-rules.md#br-eu-02-deny-self-registration-block-list)
- [BR-EU-05: Optimistic concurrency via UPDATE_NUM](../business-rules.md#br-eu-05-optimistic-concurrency-via-update_num)

> **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.External.Users\clsUserDenySelfRegistration.vb`
