---
title: "SQL-068: Retrieve location type"
summary: "Retrieve location type"
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Core
reference_type: package
---

# SQL-068: Retrieve location type

Retrieve location type in the context of `clsLocationType`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-068 |
| **Operation type** | Read |
| **Execution method** | IDataRequest.SQLStatement (CommandType.Text) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsLocationType` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve / AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Code` | Input | bound from `MyCriteria.Code` | 5 | Bound in `clsLocationType.BeforeRetrieve` (line 120) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [LOCATION_CODE](../database-tables.md#location_code) | SELECT | See sample SQL |

## Sample SQL

```sql
SELECT
  LOCATION_CODE.CODE as Code,
  LOCATION_CODE.CODE_DESCR as CodeDescr,
  LOCATION_CODE.SORT_ORDER as SortOrder,
  LOCATION_CODE.SHORT_CODE_DESCR as ShortCodeDescr,
  LOCATION_CODE.POLICY_LOCATION_FLAG as PolicyLocationFlag
FROM
  LOCATION_CODE
WHERE
  LOCATION_CODE.CODE = :Code
```

## Operations and processes
- [Filter policy locations for a view](../operations/filter-policy-locations-for-a-view.md)

## Business rules
- [BR-019: Only location types flagged PolicyLocationFlag = "Y" are](../business-rules.md#br-019-only-location-types-flagged-policylocationflag-y-are)

> **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
- `Business\SAIF.Business.Policy.Core\clsLocationType.vb`
