...
Fetch records from OPS.declarations, where:
is_active = TRUE
status not in [closed, terminated, rejected]
end_date < current_date()
Update all records to:
status = ‘closed’
updated_at = now()
updated_by = SYSTEM_USER
...
Fetch records from OPS.declarations, where:
is_active = TRUE
status not in [closed, terminated, rejected]
end_date < current_date()
Update all records to:
status = ‘closed’
updated_at = now()
updated_by = SYSTEM_USER