We have a header table ("opportunities") and a line-item table ("opportunity_details"). Each header record has 7 fields of vendor information that get copied from the first (by record-ID) line-item record.
Now, for new records, the application does this internally. But for some ten thousand older header records, this does not.
Now, if I had this problem on DB2/400 (or whatever IBM is calling it this week), I'd simply write a simple RPG "Cycle" program to do it. But it's not something I've had to do in MySQL.
Is there a pure SQL way to do this?