SQL-032: InvestigationRepositoryExtensions.GetSubjectName¶
This statement is a read operation invoked through Inline (Session.CreateSqlQuery). Executed by InvestigationRepositoryExtensions.GetSubjectName.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-032 |
| Operation type | Read |
| Execution method | Inline (Session.CreateSqlQuery) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | Text |
| Business object | InvestigationRepositoryExtensions |
| Criteria property | N/A — no IBusinessCriteria |
| Lifecycle method | GetSubjectName |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:investigationId |
Input | long (SetParameter<long>) |
N/A | Investigation case number (INVESTIGATION_SEQ_NUM) |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| INVESTIGATION | Read | See Sample SQL |
| SUBJECT | Read | See Sample SQL |
| PERSON | Read | See Sample SQL |
| COMPANY | Read | See Sample SQL |
| PROVIDER_LOCATION | Read | See Sample SQL |
| POLICY | Read | See Sample SQL |
Sample SQL¶
Source: Data/SAIF.Data.NHibernate/Repositories/Investigations/InvestigationRepositoryExtensions.cs:8
SELECT
nvl(per.NAME,
nvl(com.company_name,
nvl(loc.business_name, ''))) as worker_name,
sub.worker_id,
pol.policy_name
FROM investigation inv
JOIN subject sub ON inv.subject_seq_num = sub.subject_seq_num
LEFT OUTER JOIN person per ON per.person_seq_num = sub.person_seq_num
LEFT OUTER JOIN company com ON com.company_seq_num = sub.company_seq_num
LEFT OUTER JOIN provider_location loc ON loc.provider_location_seq_num = inv.provider_location_seq_num
LEFT OUTER JOIN policy pol ON pol.policy_num = inv.policy_num
WHERE investigation_seq_num = :investigationId
Operations and processes¶
Business rules¶
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
Data/SAIF.Data.NHibernate/Repositories/Investigations/InvestigationRepositoryExtensions.cs:8