---
title: "SQL-015: Task purge"
summary: Physically deletes previously soft-deleted task rows through `PK82036_Task.Task_Purge`.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Tasks
reference_type: package
---

# SQL-015: Task purge

Physically deletes previously soft-deleted task rows through `PK82036_Task.Task_Purge`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-015 |
| **Operation type** | Delete |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `WCIS_DBA` |
| **Command type** | StoredProcedure |
| **Business object** | `clsTaskCollection` |
| **Criteria property** | N/A |
| **Lifecycle method** | `PurgeTasks` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:intasksourcecode` | Input | `TASK.TASK_SOURCE_CODE%TYPE` | 5 | Source-system filter. |
| `:intaskcategorycode` | Input | `TASK.TASK_CATEGORY_CODE%TYPE` | 5 | Category filter. |
| `:inkeepdays` | Input | `VARCHAR2` | 5 | Retention days. |
| `:outdelrows` | Output | `VARCHAR2` | 15 | Deleted-row count. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [TASK](../database-tables.md#task) | DELETE | TASK_SOURCE_CODE, TASK_CATEGORY_CODE, DELETE_FLAG, UPDATE_DATE |

## Sample SQL

```sql
PK82036_Task.Task_Purge(
  intasksourcecode => :intasksourcecode,
  intaskcategorycode => :intaskcategorycode,
  inkeepdays => :inkeepdays,
  outdelrows => :outdelrows
);
```

## Operations and processes
- [Purge deleted tasks](../operations/task-purge.md)

## Sources
- `Business\SAIF.Business.Tasks\clsTaskCollection.vb`
