---
title: "SQL-027: Retrieve menu security records by menu item"
summary: Retrieves MENU_SECURITY records filtered by MENU_ITEM_SEQ_NUM.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Menu
reference_type: package
---

# SQL-027: Retrieve menu security records by menu item

Retrieves all security records from `MENU_SECURITY` that are associated with a specific menu item.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-027 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsMenuSecurityCollection` |
| **Criteria property** | `RetrieveForItemSQL` |
| **Lifecycle method** | `BeforeRetrieve` (MenuItemSeqNum > 0) / `AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuItemSeqNum` | Input | Decimal** | N/A | Menu item FK bound from `MyCriteria.MenuItemSeqNum`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_SECURITY](../database-tables.md#menu-security) | SELECT | `MENU_SECURITY_SEQ_NUM`, `MENU_ITEM_SEQ_NUM`, `SECURITY_GROUP_TXT`, `UPDATE_DATE`, `UPDATE_USER` |

## Sample SQL

```sql
Select MENU_SECURITY.MENU_SECURITY_SEQ_NUM as MenuSecuritySeqNum,
       MENU_SECURITY.MENU_ITEM_SEQ_NUM as MenuItemSeqNum,
       MENU_SECURITY.SECURITY_GROUP_TXT as SecurityGroup,
       MENU_SECURITY.UPDATE_DATE as UpdateDate,
       MENU_SECURITY.UPDATE_USER as UpdateUser
From MENU_SECURITY
Where MENU_SECURITY.MENU_ITEM_SEQ_NUM = :MenuItemSeqNum
```

## Operations and processes
- [Menu authorization data lookup](../operations/menu-authorization-data-lookup.md)



> **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.Menu\clsMenuSecurityCollection.vb`
