You are here: Decision Strategy Manager > Interaction History > Applying sample scripts for archiving and purging > Deleting the records from the FACT table in DB2 Database Software

Deleting the records from the FACT table in DB2 Database Software

Perform this procedure to delete FACT records from a DB2 database.

  1. Connect to the source database.

  2. Execute the following script:

    DELETE FROM PR_DATA_IH_FACT WHERE PXOUTCOMETIME < TO_DATE(<DATE_STRING>, <DATE_FORMAT_STRING>);

Example:

DELETE FROM PR_DATA_IH_FACT WHERE PXOUTCOMETIME < TO_DATE('0015-01-07 00:00:00', 'yyyy-dd-mm hh24:mi:ss')