Update tbld.sql

Handles inserts into the past
BUG: Cannot handle batch inserts