Script of creating tmp tables updated.