---
title: "SQL-043: BillQueryProvider.GetCbpServiceZDecDescriptionStateless"
summary: Read operation for `BillQueryProvider.GetCbpServiceZDecDescriptionStateless`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-043: BillQueryProvider.GetCbpServiceZDecDescriptionStateless

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by `BillQueryProvider.GetCbpServiceZDecDescriptionStateless`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-043 |
| **Operation type** | Read |
| **Execution method** | ORM (NHibernate LINQ) |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `BillQueryProvider` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `GetCbpServiceZDecDescriptionStateless` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `serviceCode` | Input | string | N/A | Method argument of `BillQueryProvider.GetCbpServiceZDecDescriptionStateless` bound into the ORM expression; NHibernate generates the bind variable at runtime |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CBP_SERVICE_DESCRIPTION](../database-tables.md#cbp_service_description) | SELECT | BILL_SERVICE_CODE, BILL_SERVICE_TYPE_CODE, SERVICE_DESCR_EFF_DATE, UPDATE_NUM, SERVICE_DESCR_EXP_DATE, SERVICE_DESCR_TEXT, UPDATE_USER, UPDATE_DATE |

## LINQ statement

Source: `Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:181`.

```csharp
return Factory.GetRepository<CbpServiceDescriptionStateless>().Query().SingleOrDefault(x => x.Service == serviceCode && x.ServiceType ==  "Z");
```

## Sample SQL

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
  CSD.BILL_SERVICE_CODE,
  CSD.BILL_SERVICE_TYPE_CODE,
  CSD.SERVICE_DESCR_EFF_DATE,
  CSD.UPDATE_NUM,
  CSD.SERVICE_DESCR_EXP_DATE,
  CSD.SERVICE_DESCR_TEXT,
  CSD.UPDATE_USER,
  CSD.UPDATE_DATE
FROM CBP_SERVICE_DESCRIPTION CSD
WHERE CSD.BILL_SERVICE_CODE = :serviceCode
  AND CSD.BILL_SERVICE_TYPE_CODE = 'Z'
-- NHibernate expects at most one row
```

Translation notes:
- This is the stateless variant of SQL-042: `Service` and `ServiceType` are plain `KeyProperty` columns on `CbpServiceDescriptionStateless`, so there is no pre-query and the literal `'Z'` is used directly.

## Operations and processes

- [Bill queries](../operations/bill-queries.md)

## Business rules

- [SD-BR-034 Bill entry source classification](../business-rules.md#sd-br-034-bill-entry-source-classification)
- [SD-BR-035 Bill allowed total treats null as zero](../business-rules.md#sd-br-035-bill-allowed-total-treats-null-as-zero)
- [SD-BR-036 Service code current only when expiration date is null](../business-rules.md#sd-br-036-service-code-current-only-when-expiration-date-is-null)

## Sources
- `Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:181`
