---
title: "SQL-030: Retrieve group memberships for one user"
summary: Retrieve group memberships for one user
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# SQL-030: Retrieve group memberships for one user

This statement is the `retrieveForUserSQL` implementation of `clsMenuSecurityUserCollection.Criteria`, executed from `BeforeRetrieve` against `MENU_SECURITY_USER`. Retrieve group memberships for one user.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuUser` | Not bound | String | N/A | Placeholder present in the SQL text; the branch that selects this statement adds no `AddParm` call — the filter cannot execute as written* |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_SECURITY_USER](../database-tables.md#menu_security_user) | SELECT | MENU_SECURITY_USER_SEQ_NUM, SECURITY_GROUP_TXT, MENU_USER, MENU_USER_ID |

## Sample SQL

```sql
-- Retrieve group memberships for one user
Select
  MENU_SECURITY_USER.MENU_SECURITY_USER_SEQ_NUM as MenuSecurityUserSeq,
  MENU_SECURITY_USER.SECURITY_GROUP_TXT as SecurityGroupTxt,
  MENU_SECURITY_USER.MENU_USER as MenuUser,
  MENU_SECURITY_USER.MENU_USER_ID as MenuUserID
From
  MENU_SECURITY_USER
WHERE
  MENU_USER = :MenuUser
```

## Operations and processes

- [Load a user's group memberships](../operations/op-menu-09-load-user-group-memberships.md)

## Business rules

- [BR-MENU-001](../business-rules.md#br-menu-001-scoped-vs-unfiltered-retrieval): Scoped vs. unfiltered retrieval

> **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
- SAIF.Business.Menu/clsMenuSecurityUserCollection.vb
