Skip to content

SQL-031: Retrieve index batch summary by batch ID

This statement aggregates IMGSYS rows for a specific batch ID where IDXFL = 'N' (not indexed) and DELCD = ' ' (not deleted), returning the batch ID, scan date, and count of remaining documents. Executed by clsIndexBatch.BeforeRetrieve.

Classification

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

Parameters

Parameter Direction Type Max length Description
:BatchID Input [not specified]** 15 The batch ID to retrieve.

Tables

Table Access Columns used
IMGSYS SELECT (aggregated) BATID, SCANDT, IDXFL, DELCD

Sample SQL

select
    batid BatchId,
    scandt ScanDate,
    count(*) RemainingDocs
from imgsys
where nvl(idxfl,'N') = 'N'
  and nvl(delcd,' ') = ' '
  and batid = :BatchID
group by batid, scandt

Operations and processes

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

Sources

  • Business\SAIF.Business.Imaging\clsIndexBatch.vb