Skip to content

SQL-022: Retrieve IMAGE_DOCUMENT_NAME_CODE by key (possibly incomplete)

This statement selects from IMAGE_DOCUMENT_NAME_CODE with a LEFT JOIN to IMAGE_DOCUMENT_NAME_GCODE for culture-specific descriptions. The RetrieveSQL ends with a bare Where keyword and BeforeRetrieve adds no predicate text, making this path possibly dead or incomplete code**.

Classification

Field Value
SQL ID SQL-022
Operation type Read
Execution method Inline SQL
Database Oracle
Schema [unqualified]**
Command type Text**
Business object clsImageDocumentNameCode
Criteria property RetrieveSQL
Lifecycle method BeforeRetrieve

Parameters

Parameter Direction Type Max length Description
:cultureCode Input [not specified]** N/A Culture code for localized description lookup (referenced inside upper(:cultureCode))**

Tables

Table Access Columns used
IMAGE_DOCUMENT_NAME_CODE SELECT CODE, CODE_DESCR, INTERNAL_DESCR, IMAGE_FILE_CODE, IMAGE_CATEGORY_CODE, IMAGE_DOCUMENT_TYPE_CODE
IMAGE_DOCUMENT_NAME_GCODE SELECT / LEFT JOIN CODE, CODE_DESCR, CULTURE_CODE

Sample SQL

-- Note: SQL ends with bare WHERE — likely an incomplete implementation**
Select
    c.CODE as Code,
    case when gc.code_descr is not null
         then gc.code_descr
         else cast(c.CODE_DESCR as nvarchar2(100))
    end as CodeDescr,
    c.INTERNAL_DESCR as InternalDescr,
    c.IMAGE_FILE_CODE as ImageFileCode,
    c.IMAGE_CATEGORY_CODE as ImageCategoryCode,
    c.IMAGE_DOCUMENT_TYPE_CODE as ImageDocumentTypeCode
From IMAGE_DOCUMENT_NAME_CODE c
left join image_document_name_gcode gc
    on C.CODE = gc.code
    and gc.culture_code = upper(:cultureCode)
Where

Operations and processes

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

Sources

  • Business\SAIF.Business.Imaging\clsImageDocumentNameCode.vb