Skip to content

SQL-029: Count IMAGE_DOCUMENT_TYPE_CODE rows for validation

This statement is a validation query that counts rows in IMAGE_DOCUMENT_TYPE_CODE matching a given document type code, category code, and file code combination. It is used by the clsImageIdx category/type validation logic (via clsImageMsgConst.SQL_CAT_TYPE_MISMATCH) to verify that the combination is valid before saving an image index record.

Classification

Field Value
SQL ID SQL-029
Operation type Read
Execution method Inline SQL
Database Oracle
Schema [unqualified]**
Command type Text**
Business object clsImageMsgConst
Criteria property SQL_CAT_TYPE_MISMATCH
Lifecycle method clsImageIdx category/type validation

Parameters

Parameter Direction Type Max length Description
:ImageDocumentTypeCode Input [not specified]** 5 The document type code to validate.
:ImageCategoryCode Input [not specified]** 5 The category code to validate.
:ImageFileCode Input [not specified]** 5 The file code to validate.

Tables

Table Access Columns used
IMAGE_DOCUMENT_TYPE_CODE SELECT (COUNT) CODE, IMAGE_CATEGORY_CODE, IMAGE_FILE_CODE

Sample SQL

Select Count(*)
from Image_Document_Type_Code
where Code = :ImageDocumentTypeCode
  and Image_Category_Code = :ImageCategoryCode
  and Image_File_Code = :ImageFileCode

Operations and processes

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

Sources

  • Business\SAIF.Business.Imaging\clsImageMsgConst.vb