Ok, I have been doing this to long to spend time - wasting my time - trying to figure out what is happening with SQL.
So, here are pictures of the screens:
Sample of the t-Script
History Task Maintenance
Sample of the t-Script
*This post is locked for comments