---
title: "SQL-019: clsPaymentEvent insert"
summary: Inserts a payment lifecycle event record into PAYMENT_EVENT.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Payment.EFT
reference_type: package
---

# SQL-019: clsPaymentEvent insert

Inserts a payment lifecycle event record into PAYMENT_EVENT.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-019 |
| **Operation type** | Create |
| **Execution method** | Inline SQL |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsPaymentEvent` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert / AfterInsert` |


## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| :CreateDate | Input | Date | — | Binds `CreateDate`* |
| :CreateUser | Input | String | 30 | Binds `CreateUser`* |
| :PaymentEventSeqNum | Input | Decimal | — | Binds `PaymentEventSeqNum` |
| :BankEffEntryDate | Input | Date | — | Binds `m_BankEffEntryDate`* |
| :BatchDate | Input | Date | — | Binds `m_BatchDate`* |
| :BatchNum | Input | Decimal | — | Binds `m_BatchNum`* |
| :PaymentReturnReasonCode | Input | String | 5 | Binds `m_PaymentReturnReasonCode`* |
| :TraceNum | Input | String | 20 | Binds `m_TraceNum`* |
| :PaymentDetailSeqNum | Input | Decimal | — | Binds `MyCriteria.PaymentDetailSeqNum`* |
| :PaymentEventCode | Input | String | 5 | Binds `MyCriteria.PaymentEventCode`* |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PAYMENT_EVENT](../database-tables.md#payment_event) | — | — |

## Sample SQL

```sql
Insert into PAYMENT_EVENT (
  BANK_EFF_ENTRY_DATE, BATCH_DATE, BATCH_NUM, CREATE_DATE, CREATE_USER,
  PAYMENT_DETAIL_SEQ_NUM, PAYMENT_EVENT_CODE, PAYMENT_EVENT_SEQ_NUM,
  PAYMENT_RETURN_REASON_CODE, TRACE_NUM
)
Values (
  :BankEffEntryDate, :BatchDate, :BatchNum, :CreateDate, :CreateUser,
  :PaymentDetailSeqNum, :PaymentEventCode, :PaymentEventSeqNum,
  :PaymentReturnReasonCode, :TraceNum
)
```

## 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.

## Business rules
- [BR-EFT-05: Insert/update operations require exactly one affected row](../business-rules.md#br-eft-05-insertupdate-operations-require-exactly-one-affected-row)*

## Sources
- `Business\SAIF.Business.Payment.EFT\clsPaymentEvent.vb`
