---
title: "SQL-009: Team assignment retrieval"
summary: Retrieve staff team assignments for a policy.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-31
library: SAIF.Business.View.Policy
reference_type: package
---

# SQL-009: Team assignment retrieval

`clsTeamAssignmentCollection` uses this call to load the SAIF staff assigned to a policy, together with office, customer-service-team, agency, and producer rows presented in the same shape. The loss-control assignment returned here also drives loss-control authorization.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-009 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]`** |
| **Command type** | StoredProcedure |
| **Business object** | `clsTeamAssignmentCollection` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` / `AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:apolicynum` | Input | Decimal | not specified | Policy number whose team assignments, plus office, customer-service-team, agency, and producer pseudo-rows, are requested. |
| `recordset` | Output (Cursor) | REF CURSOR | N/A | Result set of team assignments keyed by team function. |

## Tables

No table is referenced directly in the .NET source. The tables read by the procedure body reside in the Oracle database and are described under [pk72846_view_policy](../procedures/pk72846_view_policy.md).

## Sample SQL

```sql
-- Stored procedure call (procedure body resides in the Oracle database - WCIS_DBA.pk72846_view_policy)
CALL pk72846_view_policy.team_assign_query(
  apolicynum => :apolicynum,
  recordset  => :recordset)  -- REF CURSOR output
```

## Operations and processes

- [Retrieve supporting policy aggregates](../operations/retrieve-supporting-policy-aggregates.md)
- [Authorize a policy for the current user](../operations/authorize-policy-for-user.md)

## Business rules

- [BR-007: Loss-control consultants see only policies they are assigned to](../business-rules.md#br-007-loss-control-consultants-see-only-policies-they-are-assigned-to)

> **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.View.Policy/clsTeamAssignmentCollection.vb`
