More sql syntax corrections.