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


# SQL-002: CollectionsRepository.CreateSoilDebtorReferenceRecords

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

## Classification

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

## Parameters

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

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [SOIL_DEBTOR_REFERENCE](../database-tables.md#soil_debtor_reference) | C | See Sample SQL |
| [LEGAL_COLLECTION_DEBTOR](../database-tables.md#legal_collection_debtor) | Write | See Sample SQL |
| [LEGAL_COLLECTION](../database-tables.md#legal_collection) | 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 |

## Sample SQL

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

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

## Operations and processes

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

## Business rules

- [SDN-BR-011](../business-rules.md#sdn-br-011-soil-debtor-eligibility%3A-balance-%E2%89%A5-0%2C-include-on-soil-flag-'y'%2C-no-third-party%2C-worker-id-present)
- [PROC-RULE-030](../business-rules.md#proc-rule-030-soil-eligibility)
- [PROC-RULE-031](../business-rules.md#proc-rule-031-audit-user)

> **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:131`
