Fix sql querry to update a dr