Updating inside an oracle function