error fix in sql