---
title: "SQL-008: Retrieve agent of record for a policy"
summary: Retrieve the policy agent-of-record key from POLICY.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Agency
reference_type: package
---

# SQL-008: Retrieve agent of record for a policy

This application-layer statement is used by `clsProducer.GetAgent` to bypass the normal BOF criteria path and resolve the producer key stored on a policy row.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-008 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]` |
| **Command type** | Text |
| **Business object** | `N/A (Application layer)` |
| **Criteria property** | `N/A` |
| **Lifecycle method** | `N/A` |
| **Application class** | `clsProducer` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PolicyNum` | Input | Decimal (`NUMBER`) | N/A | Policy number whose agent-of-record key should be returned. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [POLICY](../database-tables.md#policy) | SELECT | `POLICY_NUM`, `AGENT_NUM` |

## Sample SQL

```sql
SELECT
  agent_num
FROM policy
WHERE policy_num = :PolicyNum
```

## Operations and processes
- [Look up the agent of record for a policy](../operations/look-up-the-agent-of-record-for-a-policy.md)

## Business rules
- [BR-017: Agent of record is read from POLICY.AGENT_NUM](../business-rules.md#br-017-agent-of-record-is-read-from-policyagent_num)

## Sources
- `Business\SAIF.Business.Policy.Agency\clsProducer.vb`
