---
title: "SQL-002: Retrieve hazard groups by effective date"
summary: Load hazard groups active for a supplied date.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy
reference_type: package
---

# SQL-002: Retrieve hazard groups by effective date

Load hazard groups active for a supplied date.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-002 |
| **Operation type** | Read |
| **Execution method** | StringBuilder-assembled SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsHazardGroupCollection` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` / `AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| `:EffectiveDate` | Input | Date | N/A | As-of date applied to the effective/expiration window. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [HAZARD_GROUP](../database-tables.md#hazard_group) | SELECT | Effective-dated hazard-group columns

## Sample SQL

```sql
SELECT
  H.HAZARD_GROUP_ID,
  H.HAZARD_GROUP_SHORT_DESCR,
  H.HAZARD_GROUP_LONG_DESCR,
  H.EFFECTIVE_DATE,
  H.EXPIRATION_DATE,
  H.CREATE_DATE,
  H.CREATE_USER,
  H.UPDATE_DATE,
  H.UPDATE_USER,
  H.NCCI_HAZARD_GROUP_CODE
FROM HAZARD_GROUP H
WHERE :EffectiveDate >= H.EFFECTIVE_DATE
  AND :EffectiveDate < NVL(H.EXPIRATION_DATE, :EffectiveDate + 1)
```

## Operations and processes

- [Retrieve hazard groups effective on a date](../operations/retrieve-hazard-groups-effective-on-a-date.md)
- [Compare and locate hazard groups](../operations/compare-and-locate-hazard-groups.md)

## Business rules

- See [Business rules](../business-rules.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.Policy\clsHazardGroupCollection.vb`
