update sql to remove error