---
title: "SQL-015: Legal-case existence"
summary: Determines whether a claim has at least one LEGAL_CASE row.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business
reference_type: package
---

# SQL-015: Legal-case existence

This query checks whether a claim already has a legal-case record before claim workflows proceed with legal or imaging-related processing.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-015 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `ClaimServices` |
| **Criteria property** | `N/A` |
| **Lifecycle method** | `LegalCaseExists` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:ClaimID` | Input | Decimal | N/A | Claim identifier used to test for an existing legal case. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [LEGAL_CASE](../database-tables.md#legal-case-legal-collection-investigation-cl-claim-support-order-conn) | SELECT | `CLAIM_ID` |

## Sample SQL

```sql
-- ClaimServices.LegalCaseExists
SELECT COUNT(*)
  FROM LEGAL_CASE
 WHERE CLAIM_ID = :ClaimID
```

## Operations and processes
- [Claim authorization and visibility checks](../operations/claim-information-and-authorization-support.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Business\SAIF.Business\ClaimServices.vb`
