I have a select query which works correctly with the below output:

I would like to create an update statement to set the value of the despgoods_alldetails.loadid column = loaddetails.loadid where despgoods_alldetails_despgoodsid=loaddetails.despgoodsid.loadid.
I was thinking along the lines of
update despgoods_alldetails
set despgoods_alldetails.loadid = loaddetails.loadid
where despgoods_alldetails.despgoodsid=loaddetails.despgoodsid
This query fails with the below error:

any idea how I can get this update statement to work?
Thanks,
Ryan
Almost had it, you just need a reference to the second table.