Script to un-age creditor transactions and allocations based on a supplied date

Problem

A period roll-over has been accidentally run and transactions are required to be un-aged for changes to be made to allocations.

Solution

SQL skills are required

Sound knowledge of SQL is required to complete task

The attached script will un-age creditor transactions and associated allocations where the transaction date is on or after a specific date - e.g. 31 May 2016.  Edit the date as required.