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


# SQL-006: CollectionsRepository.GetDebtorName

This statement is a read operation invoked through StoredProc (named query Collections_GetDebtorName). Executed by `CollectionsRepository.GetDebtorName`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-006 |
| **Operation type** | Read |
| **Execution method** | StoredProc (named query `Collections_GetDebtorName`) |
| **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** | `GetDebtorName` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:debtor_seq_num_in` | Input | NUMBER (.NET `long`) | N/A | Debtor id |
| `return` | Return | VARCHAR2 → `string` | N/A** | Formatted debtor name |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [LEGAL_COLLECTION_DEBTOR](../database-tables.md#legal_collection_debtor) | Read | See Sample SQL |
| [LEGAL_COLLECTION](../database-tables.md#legal_collection) | Read | See Sample SQL |
| [AFFILIATE](../database-tables.md#affiliate) | Read | See Sample SQL |
| [POLICY](../database-tables.md#policy) | Read | See Sample SQL |
| [THRDPARTY](../database-tables.md#thrdparty) | Read | See Sample SQL |
| [PERSON](../database-tables.md#person) | Read | See Sample SQL |
| [THRDPARTY_FIRM](../database-tables.md#thrdparty_firm) | Read | See Sample SQL |
| [COMPANY](../database-tables.md#company) | Read | See Sample SQL |

## Sample SQL

Source: `Data/SAIF.Data.NHibernate/Mappings/Collections/Collections.hbm.xml:15`

```sql
select pk80010_legal_collections.GetDebtorName(:debtor_seq_num_in) as DebtorName from dual
```

## Operations and processes

- [Collections case lookups](../operations/collections-case-lookups.md)

## Business rules

- [PROC-RULE-012](../business-rules.md#proc-rule-012-debtor-name-resolution-order)

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