---
title: "SQL-003: CollectionsRepository.CreateSoilAdjustmentRecords"
summary: Create / Update operation for CollectionsRepository
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.NHibernate
reference_type: package
---


# SQL-003: CollectionsRepository.CreateSoilAdjustmentRecords

This statement is a create / update operation invoked through StoredProc (inline CreateSqlQuery + ExecuteUpdate). Executed by `CollectionsRepository.CreateSoilAdjustmentRecords`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-003 |
| **Operation type** | Create / Update |
| **Execution method** | StoredProc (inline `CreateSqlQuery` + `ExecuteUpdate`) |
| **Database** | Oracle |
| **Schema** | WCIS_DBA* (package owner; unqualified inside package) |
| **Command type** | StoredProcedure |
| **Business object** | `CollectionsRepository` |
| **Criteria property** | N/A — no IBusinessCriteria |
| **Lifecycle method** | `CreateSoilAdjustmentRecords` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:create_date_in` | Input | DATE (.NET `SetDateTime`) | N/A | Run date; selects the reference rows created on this date |
| `:run_id` | Input | VARCHAR2 (.NET `string`) | N/A** | Unique run id; filters CLM_DBA.TEMP_DATA_PERSON_ADDRESS |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [DEPT_REVENUE_SOIL_ADJUSTMENT](../database-tables.md#dept_revenue_soil_adjustment) | C | See Sample SQL |
| [LEGAL_COLLECTION_DEBTOR](../database-tables.md#legal_collection_debtor) | U | See Sample SQL |
| [SOIL_DEBTOR_REFERENCE](../database-tables.md#soil_debtor_reference) | Write | See Sample SQL |
| [LEGAL_COLLECTION](../database-tables.md#legal_collection) | Write | See Sample SQL |
| [AFFILIATE](../database-tables.md#affiliate) | Write | See Sample SQL |
| [CLM_DBA.TEMP_DATA_PERSON_ADDRESS](../database-tables.md#clm_dba.temp_data_person_address) | Write | See Sample SQL |
| [THRDPARTY](../database-tables.md#thrdparty) | Write | See Sample SQL |
| [PERSON](../database-tables.md#person) | Write | See Sample SQL |
| [DEPT_REVENUE_SOIL_BALANCE](../database-tables.md#dept_revenue_soil_balance) | Write | See Sample SQL |

## Sample SQL

Source: `Data/SAIF.Data.NHibernate/Repositories/CollectionsRepository.cs:154`

```sql
call WCIS_DBA.PK80011_LEGALCOL_SOIL.CREATE_SOIL_TRANSACTIONS(
    :create_date_in,
    :run_id
)
```

## Operations and processes

- [SOIL (State of Oregon Intercept) processing](../operations/soil-processing.md)

## Business rules

- [PROC-RULE-032](../business-rules.md#proc-rule-032-balances-are-summed-per-ssn)
- [PROC-RULE-038](../business-rules.md#proc-rule-038-dropped-debtors-are-deleted-at-dor)

> **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
- `Data/SAIF.Data.NHibernate/Repositories/CollectionsRepository.cs:152`
