fixing table names and data appending in sql import process