---
title: "SQL-021: Pk82033_ThirdParty.prediction_insert"
summary: Create operation used by `Criteria`.
status: draft
owner: SAIF
last_reviewed: 2026-07-28
library: SAIF.Business.Claim.ThirdParty
reference_type: package
---

# SQL-021: Pk82033_ThirdParty.prediction_insert

This SQL artifact supports ``Criteria`` by executing a create operation through StoredProc.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-021 |
| **Operation type** | Create |
| **Execution method** | StoredProc |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | StoredProcedure |
| **Business object** | ``Criteria`` |
| **Criteria property** | ``insertsql`` |
| **Lifecycle method** | ``Criteria create`` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PredictionSeqNum` | Input | Number | N/A | Source value `PredictionSeqNum` |
| `:CaseSeqNum` | Input | Number | N/A | Source value `CaseSeqNum` |
| `:PredictionStatusCode` | Input | String | 5 | Source value `PredictionStatusCode` |
| `:LienSeqNum` | Input | Number | N/A | Source value `LienSeqNum` |
| `:PredictionDate` | Input | Date | N/A | Source value `PredictionDate` |
| `:PredictionAmount` | Input | Number | N/A | Source value `PredictionAmount` |
| `:PredictionPercentFactor` | Input | Unknown | N/A | Source value `PredictionPercentFactor` |
| `:PredictionDescription` | Input | Unknown | 4000 | Source value `PredictionDescription` |
| `:CreateUser` | Input | String | 30 | Source value `CreateUser` |
| `:PredictionDueDate` | Input | Date | N/A | Source value `m_PredictionDueDate` |
| `:FinalPredictionFlag` | Input | String | 1 | Source value `m_FinalPredictionFlag` |
| `:RowsAffected` | ReturnValue | Return value | N/A | Source value `m_RowsAffected` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [THRDPARTY_LIEN](../database-tables.md#thrdparty_lien) | CREATE | See sample SQL. |
| [THRDPARTY_PREDICTION](../database-tables.md#thrdparty_prediction) | CREATE | See sample SQL. |
| [v_lienseqnum](../database-tables.md#v_lienseqnum) | CREATE | See sample SQL. |

## Sample SQL

```sql
BEGIN Pk82033_ThirdParty.prediction_insert(:PredictionSeqNum, :CaseSeqNum, :PredictionStatusCode, :LienSeqNum, :PredictionDate, :PredictionAmount, :PredictionPercentFactor, :PredictionDescription, :CreateUser, :PredictionDueDate, :FinalPredictionFlag, :RowsAffected); END;
-- Stored procedure body retrieved from Oracle package WCIS_DBA.Pk82033_ThirdParty.
```

> **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.Claim.ThirdParty\clsThrdpartyPrediction.vb`
