SQLTeam.com | Weblogs | Forums

Newbie Update Query

Hello,
Newbie here looking for help. Need to update a table based on a field from another table. Here is what I have so far...
Use [practice_acr]**
go
update sb.site
set sb.site.customerpo2 = 'ST'
inner join sb.site.customerno = ar.customer.customerno
where ar.customer.lastinvoicedat > '1/1/2018 12:00:00PM'
go

Thanks

Well done, your almost there:

UPDATE site
SET site.customerpo2 = 'ST'
FROM sb.site
INNER JOIN site.customerno = ar.customer.customerno
WHERE ar.customer.lastinvoicedat > '1/1/2018 12:00:00PM';