fixed sql syntax