correct a syntax error in the sql