Skip to content

SQL-008: Insert IMAGE_AGENCY row (conditional)

This statement is conditionally executed during clsImageIdx.BeforeInsert as a secondary data request (DR2) when IMAGE_FILE_CODE = "AGNCY". It creates an IMAGE_AGENCY sub-record linking the image to the specified agency.

Classification

Field Value
SQL ID SQL-008
Operation type Create
Execution method Inline SQL
Database Oracle
Schema [unqualified]**
Command type Text**
Business object clsImageIdx
Criteria property InsertImageAgencySQL
Lifecycle method BeforeInsert (conditional DR2)

Parameters

Parameter Direction Type Max length Description
:ImageSeqNum Input [not specified]** N/A Foreign key to the IMAGE row.
:AgencyId Input [not specified]** N/A The agency sequence number to associate with the image.

Tables

Table Access Columns used
IMAGE_AGENCY INSERT IMAGE_AGENCY_SEQ_NUM, IMAGE_SEQ_NUM, AGENCY_SEQ_NUM

Sample SQL

Insert into IMAGE_AGENCY (
    IMAGE_AGENCY_SEQ_NUM,
    IMAGE_SEQ_NUM,
    AGENCY_SEQ_NUM
) Values (
    IMAGE_AGENCY_SEQ.NEXTVAL,
    :ImageSeqNum,
    :AgencyId
)

Operations and processes

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

Sources

  • Business\SAIF.Business.Imaging\clsImageIdx.vb