---
title: SQL-053: Retrieve Provider Location
summary: Retrieves provider location data from Oracle.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Provider
reference_type: package
---

# SQL-053: Retrieve Provider Location

Retrieves provider location data from Oracle.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-053 |
| **Operation type** | Read |
| **Execution method** | Inline |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsProviderLocation` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| :ProviderLocationSeqNum | Input | Unspecified | N/A | Value from `MyCriteria.SeqNum` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PROVIDER_LOCATION](../database-tables.md#provider_location) | SELECT | See business-object criteria for key columns. |

## Sample SQL

```sql
Select PROVIDER_LOCATION.PROVIDER_LOCATION_SEQ_NUM as ProviderLocationSeqNum, PROVIDER_LOCATION.PROVIDER_SEQ_NUM as ProviderSeqNum, PROVIDER_LOCATION.PROVIDER_TYPE_CODE as ProviderTypeCode, PROVIDER_LOCATION.BUSINESS_FLAG as BusinessFlag, PROVIDER_LOCATION.CRITICAL_ACCESS_HOSPITAL_FLAG as CriticalAccessHospitalFlag, PROVIDER_LOCATION.BUSINESS_NAME as BusinessName, PROVIDER_LOCATION.BUSINESS_NAME_UPPER_CASE as BusinessNameUpperCase, PROVIDER_LOCATION.LAST_NAME as LastName, PROVIDER_LOCATION.LAST_NAME_UPPER_CASE as LastNameUpperCase, PROVIDER_LOCATION.FIRST_NAME as FirstName, PROVIDER_LOCATION.MIDDLE_NAME as MiddleName, PROVIDER_LOCATION.APPROVED_FLAG as ApprovedFlag, PROVIDER_LOCATION.APPROVED_USER as ApprovedUser, PROVIDER_LOCATION.PRIMARY_LOCATION_FLAG as PrimaryLocationFlag, PROVIDER_LOCATION.POSSIBLE_FRAUD_FLAG as PossibleFraudFlag, PROVIDER_LOCATION.PHONE_AREA_CODE as PhoneAreaCode, PROVIDER_LOCATION.PHONE_NUM as PhoneNum, PROVIDER_LOCATION.PHONE_NUM_EXT as PhoneNumExt, PROVIDER_LOCATION.FAX_NUM as FaxNum, PROVIDER_LOCATION.TOLL_FREE_PHONE_NUM as TollFreePhoneNum, PROVIDER_LOCATION.TOLL_FREE_FAX_NUM as TollFreeFaxNum, PROVIDER_LOCATION.INELIGIBILITY_FLAG as IneligibilityFlag, PROVIDER_LOCATION.UPDATE_USER as UpdateUser, PROVIDER_LOCATION.UPDATE_NUM as UpdateNum, PROVIDER_LOCATION.UPDATE_DATE as UpdateDate, PROVIDER_LOCATION.RECENT_ACTIVITY_FLAG as RecentActivityFlag, PROVIDER_LOCATION.WEB_SITE_ADDRESS as WebSiteAddress, PROVIDER_LOCATION.EMAIL_ADDR as EmailAddress, PROVIDER_LOCATION.PAYEE_NAME as PayeeName From PROVIDER_LOCATION Where PROVIDER_LOCATION.PROVIDER_LOCATION_SEQ_NUM = :ProviderLocationSeqNum
```


## Operations and processes
- [Maintain provider location](../operations/maintain-provider-location.md)

## Business rules
- [BR-003: Only one primary location is allowed](../business-rules.md#br-003-only-one-primary-location-is-allowed)
- [BR-004: Provider type is required for a location](../business-rules.md#br-004-provider-type-is-required-for-a-location)
- [BR-005: Business locations require a business name](../business-rules.md#br-005-business-locations-require-a-business-name)
- [BR-006: Individual locations require a last name](../business-rules.md#br-006-individual-locations-require-a-last-name)

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

## Sources
- `Business\SAIF.Business.Provider\clsProviderLocation.vb`
