---
title: "SQL-044: Create RctPolicySelected via InsertRctPolicySelected"
summary: Create operation against RctPolicySelected via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-044: Create RctPolicySelected via InsertRctPolicySelected

This ORM statement performs a create operation on `RctPolicySelected` via `InsertRctPolicySelected`, executed from `Services/SAIF.Services/Rct/RctPolicySelectedService.cs` (L53).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-044 |
| **Operation type** | Create |
| **Execution method** | ORM (IRepository.Add) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `RctPolicySelected` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `InsertRctPolicySelected` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PolicyNumber` | Input | `long` | N/A | Identifier supplied by the caller |
| `:PolicyPeriodEffectiveDate` | Input | `DateTime` | N/A |  |
| `:PolicyStatusCode` | Input | `string` | N/A |  |
| `:TransmittedDate` | Input | `DateTime` | N/A |  |
| `:ClientUniqueId` | Input | `long` | N/A |  |
| `:CreateDate` | Input | `DateTime` | N/A |  |
| `:CreateUser` | Input | `string` | N/A |  |
| `:UpdateDate` | Input | `DateTime?` | N/A |  |
| `:UpdateUser` | Input | `string` | N/A |  |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [RCT_POLICY_SELECTED](../database-tables.md#rct_policy_selected) | INSERT | POLICY_NUM, POLICY_PERIOD_EFF_DATE, POLICY_STATUS_CODE, TRANSMITTED_DATE, CLIENT_UNIQUE_ID, CREATE_DATE, CREATE_USER, UPDATE_DATE, UPDATE_USER |

## LINQ statement

Source: `Services/SAIF.Services/Rct/RctPolicySelectedService.cs:53`.

```csharp
// Services/SAIF.Services/Rct/RctPolicySelectedService.cs:53
_unitOfWork.GetRepository<DataRct.RctPolicySelected>().Add(dataPolicySelected);
```

## Sample SQL

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
INSERT INTO RCT_POLICY_SELECTED (
  POLICY_NUM,
  POLICY_PERIOD_EFF_DATE,
  POLICY_STATUS_CODE,
  TRANSMITTED_DATE,
  CLIENT_UNIQUE_ID,
  CREATE_DATE,
  CREATE_USER,
  UPDATE_DATE,
  UPDATE_USER)
VALUES (
  :PolicyNumber,
  :PolicyPeriodEffectiveDate,
  :PolicyStatusCode,
  :TransmittedDate,
  :ClientUniqueId,
  :CreateDate,
  :CreateUser,
  :UpdateDate,
  :UpdateUser)
```

Translation notes:
- `GeneratedBy.Assigned()`: `:PolicyNumber` is supplied by the caller. Because the identifier is assigned, a stateful `SaveOrUpdate` cannot tell a new instance from a detached one by identifier alone; NHibernate may first issue a `SELECT` by `POLICY_NUM` (or rely on the version unsaved-value, if mapped) to decide between INSERT and UPDATE.

## Operations and processes
- RctPolicySelectedService.InsertRctPolicySelected — see [Operations and processes](../operations-processes.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Services/SAIF.Services/Rct/RctPolicySelectedService.cs (L53)`
