SQL-044: Soft-delete IMGSYS batch rows
This statement implements a soft delete on IMGSYS by setting DELCD to a configured delete code, updating UPDTTS to sysdate and UPDRID to the updater ID. It targets non-indexed (IDXFL = 'N'), non-deleted (DELCD = ' ') rows matching the specified batch ID. A CASE expression handles null batch IDs as a space-padded match. Executed by clsIndexBatch.BeforeDelete.
Classification
Field
Value
SQL ID
SQL-044
Operation type
Delete
Execution method
Inline SQL
Database
Oracle
Schema
[unqualified]**
Command type
Text**
Business object
clsIndexBatch
Criteria property
DeleteSQL
Lifecycle method
BeforeDelete
Parameters
Parameter
Direction
Type
Max length
Description
:DefaultDelCd
Input
[not specified]**
3
The delete code to set (soft-delete marker).
:UpdrId
Input
[not specified]**
15
Updater user ID.
:BatchID1
Input
[not specified]**
15
Batch ID (null check for CASE expression).
:BatchID2
Input
[not specified]**
15
Batch ID (CASE branch value).
Tables
Table
Access
Columns used
IMGSYS
UPDATE (soft delete)
DELCD, UPDTTS, UPDRID (WHERE: IDXFL, BATID, DELCD)
Sample SQL
update imgsys imgsys
set
delcd = : DefaultDelCd ,
updtts = sysdate ,
updrid = : updrid
where nvl ( idxfl , 'N' ) = 'N'
and nvl ( batid , ' ' ) = case
when : BatchID1 is null then ' '
else : BatchID2
end
and nvl ( delcd , ' ' ) = ' '
Operations and processes
Note: Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources
Business\SAIF.Business.Imaging\clsIndexBatch.vb