I have written this query to update null values from another column which i have extracted using JOIN however, it shows syntex error and not working.
I would like to populate PropertyAddress values from ifnull(a.propertyaddress,b.propertyaddress) for that i have written this query.
select a.ParcelID,a.PropertyAddress, b.ParcelID,b.PropertyAddress,
ifnull(a.PropertyAddress,b.PropertyAddress)
from housingdata a
join housingdata b
on a.ParcelID = b.ParcelID
and a.UniqueID <> b.UniqueID
where a.PropertyAddress is null;
update a
set PropertyAddress = ifnull(a.PropertyAddress,b.PropertyAddress)
from housingdata a << getting syntex error here*
join housingdata b
on a.ParcelID = b.ParcelID
and a.UniqueID <> b.UniqueID
where a.PropertyAddress is null;
however it shows an error in from clause in update statement.

selectstatement, you need to specify what and then which tablefrom, but in anupdatestatement you specify which table is updated first and then what tosetin it. Thejoindoesn't really differ, though as pointed out, you might want the join to sit with the main table.whereclauses are also identical between them.