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

# SQL-064: Retrieve location

Retrieve location in the context of `clsLocation`.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:LocSeqNum` | Input | bound from `MyCriteria.LocSeqNum` | - | Bound in `clsLocation.BeforeRetrieve` (line 456) |

## Tables

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

## Sample SQL

```sql
SELECT
  LOCATION.LOC_SEQ_NUM as LocSeqNum,
  LOCATION.POLICY_NUM as PolicyNum,
  LOCATION.BUS_SEQ_NUM as BusSeqNum,
  LOCATION.AGENT_NUM as AgentNum,
  LOCATION.PARENT_LOC_SEQ_NUM as ParentLocSeqNum,
  LOCATION.LOC_EFF_DATE as LocEffDate,
  LOCATION.LOC_EXP_DATE as LocExpDate,
  LOCATION.LOCATION_CODE as LocationCode,
  LOCATION.LOCATION_NAME as LocationName,
  LOCATION.LOC_ADDR1 as LocAddr1,
  LOCATION.LOC_ADDR2 as LocAddr2,
  LOCATION.LOC_CITY as LocCity,
  LOCATION.LOC_COUNTRY as LocCountry,
  LOCATION.LOC_COUNTY as LocCounty,
  LOCATION.LOC_PHONE as LocPhone,
  LOCATION.LOC_PHONE_EXT as LocPhoneExt,
  LOCATION.LOC_FAX as LocFax,
  LOCATION.LOC_STATE as LocState,
  LOCATION.LOC_ZIP as LocZip,
  LOCATION.LOC_ZIP4 as LocZip4,
  LOCATION.PROVIDER_NUM as ProviderNum,
  LOCATION.MAIL_ADDR_FLAG as MailAddrFlag,
  LOCATION.CREATE_USER as CreateUser,
  LOCATION.CREATE_DATE as CreateDate,
  LOCATION.UPDATE_USER as UpdateUser,
  LOCATION.UPDATE_DATE as UpdateDate,
  LOCATION.DIVERT_TT_FLAG as DivertTTFlag,
  LOCATION.USPS_BARCODE as UspsBarcode,
  LOCATION.EMAIL_ADDR as EmailAddr,
  LOCATION.EMPLOYEE_COUNT as EmployeeCount,
  LOCATION.LOC_ADDR3 as LocAddr3,
  LOCATION.PRIMARY_LOCATION_FLAG as PrimaryLocationFlag,
  LOCATION.CELL_PHONE as CellPhone
FROM
  LOCATION
WHERE
  LOCATION.LOC_SEQ_NUM = :LocSeqNum
```

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

## Business rules
- [BR-017: A location is active as of a date](../business-rules.md#br-017-a-location-is-active-as-of-a-date)

> **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\clsLocation.vb`
