---
title: Read Pa Zip Code Data
summary: SQL-075
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Audit.Premium
reference_type: package
---

# SQL-075: Read Pa Zip Code Data

This statement supports the premium-audit library by read Pa Zip Code Data.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `—` | — | — | — | No bound parameters detected in source. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [`PA_ZIP_CODE`](../database-tables.md#pa_zip_code) | JOIN | See sample SQL. |
| [`COUNTY`](../database-tables.md#county) | JOIN | See sample SQL. |
| [`OFFICE_CODE`](../database-tables.md#office_code) | JOIN | See sample SQL. |

## Sample SQL

```sql
SELECT
  z.zip_code AS zipcode,
  NVL (z.audit_office_code, c.office_code) AS auditofficecode,
  ao.code_descr AS auditofficename,
  z.state_code AS statecode,
  z.county_code AS countycode,
  c.county_name AS countyname,
  c.office_code AS officecode,
  o.code_descr AS officename,
  o.policy_region_code AS policyregioncode
FROM
  pa_zip_code z
LEFT OUTER JOIN
  county c ON (z.county_code = c.county_code)
LEFT OUTER JOIN
  office_code o ON (c.office_code = o.code)
LEFT OUTER JOIN
  office_code ao ON (z.audit_office_code = ao.code)
```

## Operations and processes
- [Assign renewal (batch) audits to auditors](../operations/assign-renewal-batch-audits-to-auditors.md)
- [Assign off-cycle audits to auditors](../operations/assign-off-cycle-audits-to-auditors.md)

## Business rules
- [BR-012](../business-rules.md#br-012-assignment-requires-zip-code)
- [BR-068](../business-rules.md#br-068-an-auditor-zip-row-requires-an-existing-auditor-an-assignable-auditor-and-an-existing-zip-code)



> **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.Audit.Premium/clsZipCodeCollection.vb:466`
