Skip to main content

ARCHIVE_DATA

Archive rows in the target table based on a source record and date field. All rows matching the source data and having the date column greater than the provided date value will be marked as archived

Example Usage

ARCHIVE_DATA(Leave, StartDate, Employees.TerminateDate) // Assuming Employees is the source data behind the call to the function; then Employees.ID -> Leave.Employees_ID

Overview

Function signature
ARCHIVE_DATA(table, datecolumn, datevalue)

Category
Database

Return data type
None

Arguments

NameDataTypeList Options                          Description
tablestringThe target table containing the data to archive. The source data (e.g. Employees) will be used to filter the target table rows.
datecolumnstringThe column in the target table containing the date value after which to archive
datevaluedateThe source date value used to search the target table (e.g. if the source is an Employee, then Employees.TerminateDate might be the "datevalue" such that any rows in the Target table who's "datecolumn" is greater then "Employees.TerminateDate" will be marked as archived)