r3nder
asked on
update with a select
I am trying to convert this from mysql to sql can someone help?
UPDATE Temp_Parts tp
JOIN (SELECT inventorylistid,
locationid,
Max(insertdate) AS MaxInsertDate
FROM Inventory_PartsHistory
GROUP BY inventorylistid,
locationid) D
ON D.inventorylistid = tp.inventorylistid
AND D.locationid = tp.locationid
SET tp.insertdate = D.maxinsertdate
WHERE D.maxinsertdate IS NOT NULL;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks Kyle
Open in new window