Copy data between tables

Thanks for the quick response.

I’ve added the iteration loop but I’m struggling to find how to reference the related fields:

Version a:

    for res in racelist:
        raceScoresNew = RaceScores(race_id=res.event_id, position=res.position, boat_id=res.boat_id, flight_id=res.flight_id)
        raceScoresNew.save()

Version b:

    for res in racelist:
        raceScoresNew = RaceScores(race_id=res.event_id, position=res.racedata_in_race.position, boat_id=res.racedata_in_race.boat_id, flight_id=res.racedata_in_race.flight_id)
        raceScoresNew.save()

I’d welcome some guidance on how to reference these related fields within the query.

I’ve opted not to go for the bulk_update() method as it’s likely I will need to do some error handling.

Many thanks
Paul