update_according_to function

Update a flat table according to another structure