Updating a record through cursor