clean up sql stmt