New runtime_sql algorithm. Removed old tq_sql parse_transform