fix a sql parsing error