---
title: "SQL-019: Retrieve IMAGE_CATEGORY_CODE by code and file code"
summary: Retrieves a single IMAGE_CATEGORY_CODE row by code and image file code.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Business.Imaging
reference_type: package
---

# SQL-019: Retrieve IMAGE_CATEGORY_CODE by code and file code

This statement retrieves a single `IMAGE_CATEGORY_CODE` row using both the `CODE` and `IMAGE_FILE_CODE` keys. It is executed by `clsImageCategoryCode.BeforeRetrieve`.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Code` | Input | [not specified]** | 5 | The category code value. |
| `:ImageFileCode` | Input | [not specified]** | 5 | The image file code to scope the category lookup. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [IMAGE_CATEGORY_CODE](../database-tables.md#image_category_code) | SELECT | CODE, CODE_DESCR, CREATE_DATE, CREATE_USER, IMAGE_FILE_CODE, RETENTION_SCHEDULE_CODE |

## Sample SQL

```sql
Select
    IMAGE_CATEGORY_CODE.CODE as Code,
    IMAGE_CATEGORY_CODE.CODE_DESCR as CodeDescr,
    IMAGE_CATEGORY_CODE.CREATE_DATE as CreateDate,
    IMAGE_CATEGORY_CODE.CREATE_USER as CreateUser,
    IMAGE_CATEGORY_CODE.IMAGE_FILE_CODE as ImageFileCode,
    IMAGE_CATEGORY_CODE.RETENTION_SCHEDULE_CODE as RetentionScheduleCode
From IMAGE_CATEGORY_CODE
Where IMAGE_CATEGORY_CODE.CODE = :Code
  AND IMAGE_FILE_CODE = :ImageFileCode
```

## Operations and processes
- [Code table management](../operations/code-table-management.md)

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

## Sources
- `Business\SAIF.Business.Imaging\clsImageCategoryCode.vb`
