remove semicolon at end of tmp table creation statement so it can be joined