---
title: "SQL-046: Retrieve effective USL&HW compensation factor"
summary: Retrieve effective USL&HW compensation factor
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Rating
reference_type: package
---

# SQL-046: Retrieve effective USL&HW compensation factor

This document records the SQL used by `clsUSLHWCompFactor` in `SAIF.Business.Policy.Rating`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-046 |
| **Operation type** | Read |
| **Execution method** | Data portal — criteria SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsUSLHWCompFactor` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve / AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:EffectiveDate` | Input | Not specified | not specified | Bound parameter. |
| `:MarketTypeCode` | Input | Not specified | not specified | Bound parameter. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [USLHW_COMP_FACTOR](../database-tables.md#uslhw_comp_factor) | SELECT | See sample SQL and source for column usage. |

## Sample SQL

```sql
Select
  USLHW_COMP_FACTOR.USLHW_FACTOR as Factor,
  USLHW_COMP_FACTOR.USLHW_EFF_DATE as EffectiveDate,
  USLHW_COMP_FACTOR.USLHW_EXP_DATE as ExpirationDate,
  USLHW_COMP_FACTOR.MARKET_TYPE_CODE as MarketTypeCode,
  USLHW_COMP_FACTOR.CREATE_DATE as CreateDate,
  USLHW_COMP_FACTOR.CREATE_USER as CreateUser,
  USLHW_COMP_FACTOR.UPDATE_DATE as UpdateDate,
  USLHW_COMP_FACTOR.UPDATE_USER as UpdateUser
From
  USLHW_COMP_FACTOR
Where
  USLHW_COMP_FACTOR.USLHW_EFF_DATE = :EffectiveDate
  AND (
    USLHW_COMP_FACTOR.USLHW_EXP_DATE < :EffectiveDate
    OR USLHW_COMP_FACTOR.USLHW_EXP_DATE IS NULL
  )USLHW_COMP_FACTOR.MARKET_TYPE_CODE = :MarketTypeCode
```

## Operations and processes
- [Compute the base rate for a class](../operations/compute-the-base-rate-for-a-class.md)

## Business rules
- [BR-012](../business-rules.md#br-012-the-uslhw-comp-factor-applies-only-when-the-rate-tier-record-is-valid-and-the-providers-manual-class-type-is-uslh-otherwise-the-neutral-factor-is-returned)
- [BR-029](../business-rules.md#br-029-a-uslhw-comp-factor-requires-an-effective-date-other-than-dateminvalue)

> **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.Rating\clsUSLHWCompFactor.vb:354-363`