Remove stray period in SQL statement