I've added the last three fields to this table, but they are blank. All of the records have the top three filled in. The table definition is,
mysql> describe nh3tk;
+-----------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
| spectra | varchar(50) | NO | PRI | NULL | |
| value | float | NO | | NULL | |
| error | float | NO | | NULL | |
| nonthermal_FWHM | double | YES | | NULL | |
| sound_speed | double | YES | | NULL | |
+-----------------+-------------+------+-----+---------+-------+
The Select query, which works is,
select nh3tk.spectra,
pow((pow(2.35*nh3lw.sd_lw,2)-1.38065e-23*8*ln(2)*nh3tk.value/2.82e-26),0.5) as nonthermal_FWHM,
pow(1.38065e-23*nh3tk.value/(2.33*3.348e-27),0.5) as sound_speed
from nh3tk
left join nh3lw on nh3tk.spectra=nh3lw.spectra;
Now I just need to take the two calculated fields from that query and put them in the right fields in nh3tk, where the spectra match.
Any help would be gratefully appreciated.
Best regards James