Clean up sql syntax errors.