---
title: "SQL-012: Retrieve one application code by code"
summary: Retrieve one application code by code
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# SQL-012: Retrieve one application code by code

This statement is the `RetrieveSQL` implementation of `clsApplicationCode.Criteria`, executed from `BeforeRetrieve` against `BUSONLINE_APPS_CODE`. Retrieve one application code by code.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-012 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]`** |
| **Command type** | Text |
| **Business object** | `clsApplicationCode` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Code` | Input | String | 5 | Application code to look up |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [BUSONLINE_APPS_CODE](../database-tables.md#busonline_apps_code) | SELECT | CODE, CODE_DESCR, ACTIVE_CODE |

## Sample SQL

```sql
-- Retrieve one application code by code
SELECT
  CODE as Code,
  CODE_DESCR as ApplicationPath,
  NVL(ACTIVE_CODE,'Y') as ActiveFlag
FROM
  BUSONLINE_APPS_CODE
Where
  CODE = :Code
```

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- SAIF.Business.Menu/clsApplicationCode.vb
