---
title: "SQL-037: Image/ifn lookup family*"
summary: Image/ifn lookup family*.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business
reference_type: package
---

# SQL-037: Image/ifn lookup family*

This document describes `SQL-037`, the image/ifn lookup family* statement or call used by `SAIF.Business`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-037 |
| **Operation type** | Read |
| **Execution method** | Inline |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `ImageInfo` |
| **Criteria property** | `N/A` |
| **Lifecycle method** | `FillByImageID, FillByIFN, FillByTowerID` |

## Parameters

This SQL statement has no explicit parameters in the provided findings.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [IMAGE](../database-tables.md#image-imgsys) | SELECT | See sample SQL and source implementation. |
| [IMGSYS](../database-tables.md#image-imgsys) | SELECT | See sample SQL and source implementation. |

## Sample SQL

```sql
SELECT i.image_seq_num, i.towID, s.IFNDS, s.IFNID FROM image i JOIN imgsys s ON i.towid = s.towid WHERE image_seq_num = :imageSeqNum
SELECT s.towID, s.IFNDS, s.IFNID, MAX(i.image_seq_num) AS imageID FROM imgsys s JOIN image i ON i.towid = s.towid WHERE ifnDS = :ifnDS AND ifnID = :ifnID GROUP BY s.towID, s.IFNDS, s.IFNID
SELECT s.towID, s.IFNDS, s.IFNID, MAX(i.image_seq_num) AS imageID FROM imgsys s JOIN image i ON i.towid = s.towid WHERE s.towID = :towID GROUP BY s.towID, s.IFNDS, s.IFNID
```

## Operations and processes
- [Imaging lookup and alert support](../operations/imaging-lookup-and-alert-support.md)

> **Note:** Statements marked with `*` are inferred from code behavior rather than explicit documentation or comments; statements marked with `**` could not be confirmed and should be treated as unknown until verified.

## Sources
- `Business\SAIF.Business\ImageInfo.vb`
