>This is weird UPDATE statement. I suggest to start from the SELECT with JOIN into a temp table and see how long that SELECT will work.
>
>If the select finishes in reasonable time, then still keep the temp table approach and just do UPDATE after the select based on PK.
What would be the difference with this:
UPDATE Client
SET MyDate=
(SELECT COALESCE((SELECT TOP 1 Invoice.AddDate FROM Invoice
WHERE Invoice.NoClient=Client.Numero
ORDER BY Invoice.Numero DESC),'1899-12-30 00:00:00'))
In that one, I also do a massive update where the inner select includes the relational of each update to be done (Client.Numero).
This one works ok.