---
title: "SQL-007: payment_event_seq sequence"
summary: Generates the next PAYMENT_EVENT_SEQ_NUM for clsPaymentEvent.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Payment.EFT
reference_type: package
---

# SQL-007: payment_event_seq sequence

Generates the next PAYMENT_EVENT_SEQ_NUM for clsPaymentEvent. This sequence value is generated before the corresponding INSERT operation to obtain the primary key.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-007 |
| **Operation type** | Sequence |
| **Execution method** | Inline SQL |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsPaymentEvent` |
| **Criteria property** | `CreateSQL` |
| **Lifecycle method** | `BeforeCreate / AfterCreate` |


## Parameters

This statement has no input parameters.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [DUAL](../database-tables.md#dual) | SELECT NEXTVAL | N/A |

## Sample SQL

```sql
SELECT payment_event_seq.NEXTVAL FROM DUAL
```

## Operations and processes
- [Code table lookups](../operations/code-table-lookups.md)*

> **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.Payment.EFT\clsPaymentEvent.vb`
