I could use some assistance in converting the query below to an update query. It is too complex for Query Designer to help me convert it.
I am looking to update Itemsite table records.
Specifically the field itemsite.User8 for every specific Invtid
With the value being returned by the query below as oa.InvcDate
Your assistance is greatly appreciated.
FROM ItemSite i
OUTER APPLY (
SELECT TOP (1)
FROM SOShipLine a
INNER JOIN SOShipHeader b ON a.shipperid = b.shipperid
AND b.SOTypeID IN ('CS', 'SO')and b.Cancelled<>'1'
WHERE a.InvtID = i.invtid
ORDER BY a.ShipperID DESC
where i.SiteID='WEST' and OA.InvcDate<>''
ORDER BY i.invtid