---
title: Read Pa Slctn Category Market Type Data
summary: SQL-057
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Audit.Premium
reference_type: package
---

# SQL-057: Read Pa Slctn Category Market Type Data

This statement supports the premium-audit library by read Pa Slctn Category Market Type Data.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:inPremiumAuditTypeCode` | Input | bound from `MyCriteria.inPremiumAuditTypeCode` | 5 | Bound in `clsAuditSelectionCategoryCollection.BeforeRetrieve` (line 142) |
| `:inReasonCode` | Input | bound from `MyCriteria.inReasonCode` | 5 | Bound in `clsAuditSelectionCategoryCollection.BeforeRetrieve` (line 143) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [`PA_SLCTN_CATEGORY_MARKET_TYPE`](../database-tables.md#pa_slctn_category_market_type) | JOIN | See sample SQL. |
| [`PA_SLCTN_CAT_MKT_TYPE_REASON`](../database-tables.md#pa_slctn_cat_mkt_type_reason) | JOIN | See sample SQL. |
| [`PA_SELECTION_CATEGORY_CODE`](../database-tables.md#pa_selection_category_code) | JOIN | See sample SQL. |

## Sample SQL

```sql
SELECT
  PA_TYPE_CODE as PremiumAuditTypeCode,
  PA_SELECTION_CATEGORY_CODE as SelectionCategoryCode,
  MARKET_TYPE_CODE as MarketTypeCode,
  PA_REASON_CODE as ReasonCode,
  SELECTION_RULE_COUNT as SelectionRuleCount,
  DESELECT_FLAG as DeselectFlag
FROM
  PA_SLCTN_CATEGORY_MARKET_TYPE
JOIN
  PA_SLCTN_CAT_MKT_TYPE_REASON
JOIN
  PA_SELECTION_CATEGORY_CODE
    ON (CODE = PA_SELECTION_CATEGORY_CODE)
    USING (PA_TYPE_CODE, PA_SELECTION_CATEGORY_CODE, MARKET_TYPE_CODE)
WHERE
  PA_TYPE_CODE = :inPremiumAuditTypeCode
  AND PA_REASON_CODE = :inReasonCode
ORDER BY
  SELECT_ORDER_NUM
```

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

## Business rules
- [BR-001](../business-rules.md#br-001-deselection-category-suppresses-audit)
- [BR-002](../business-rules.md#br-002-disqualifying-selection-test-blocks-selection)
- [BR-003](../business-rules.md#br-003-qualifying-tests-select-audit)



> **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/clsAuditSelectionCategoryCollection.vb:329`
