missing sql statement closure