---
title: "SQL-009: clsAppError.UpdateSQL"
summary: Attempts to update the deleted flag on an App_Error row.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-24
library: SAIF.Application.LogView
reference_type: package
---

# SQL-009: clsAppError.UpdateSQL

This statement is the library's only documented update SQL. It targets `App_Error` by sequence number and attempts to write `Deleted_Flag`, but the SQL text contains a trailing comma before `WHERE`, making the statement invalid as written.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-009 |
| **Operation type** | Update |
| **Execution method** | Inline |
| **Database** | SQL Server |
| **Schema** | `[unqualified]` |
| **Command type** | Text |
| **Business object** | `clsAppError` |
| **Criteria property** | `UpdateSQL` |
| **Lifecycle method** | No local `BeforeUpdate` override found |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `@DeletedFlag` | Input | `String` | N/A | Deleted-state value to write to `Deleted_Flag`. |
| `@AppErrorSeqNum` | Input | `Integer` | N/A | Primary-key value identifying the target row. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [App_Error](../database-tables.md#app_error) | UPDATE | `Deleted_Flag`, `App_Error_Seq_Num` |

## Sample SQL

```sql
Update App_Error
Set Deleted_Flag = @DeletedFlag,
Where App_Error.App_Error_Seq_Num = @AppErrorSeqNum
```

## Operations and processes
- [Update an error deleted flag](../operations/error-deleted-flag-update.md)

## Sources
- `Application\SAIF.Application.LogView\clsAppError.vb`

