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

# SQL-066: Read Pa Selection Test Data

This statement supports the premium-audit library by read Pa Selection Test Data.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:AuditSeqNum` | Input | bound from `MyCriteria.AuditSeqNum` | — | Bound in `clsAuditSelectionTestResultCollection.BeforeRetrieve` (line 133) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [`PA_SELECTION_TEST`](../database-tables.md#pa_selection_test) | JOIN | See sample SQL. |
| [`PA_SELECTION_RULE`](../database-tables.md#pa_selection_rule) | JOIN | See sample SQL. |

## Sample SQL

```sql
SELECT
  PAST.CREATE_DATE as CreateDate,
  PAST.CREATE_USER as CreateUser,
  PAST.PA_AUDIT_SEQ_NUM as AuditSeqNum,
  PAST.PA_SELECTION_RULE_ID as SelectionRuleID,
  PAST.UPDATE_SEQ_NUM as UpdateSeqNum,
  PSR.RULE_DESCR as RuleDescription
FROM
  PA_SELECTION_TEST PAST,
  PA_SELECTION_RULE PSR
WHERE
  PAST.PA_AUDIT_SEQ_NUM = :AuditSeqNum
  AND PAST.pa_selection_rule_id = PSR.pa_selection_rule_id
ORDER BY
  past.pa_audit_seq_num,
  past.pa_selection_rule_id
```

## Operations and processes
- [Run audit selection tests](../operations/run-audit-selection-tests.md)
- [Save a premium audit](../operations/save-a-premium-audit.md)

## Business rules
- [BR-072](../business-rules.md#br-072-a-selection-test-result-requires-a-selection-rule-id-present-in-the-pa_selection_rule-table)



> **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/clsAuditSelectionTestResultCollection.vb:313`
