fix an error in SQL syntax