M
Marc De Schrijver
I have a complex query that serves as a basis for joining to a table whose
fields need to be updated with values from fields in the complex query.
Trying to run the update query results in the "Query must use updateable
query" message.
The basic outline of my query is as follows:
UPDATE Table1
INNER JOIN ((SELECT DISTINCT OrderNr, Max(Price) AS MaxPrice FROM Table2
GROUP BY OrderNr) AS TempTable)
ON Table1.OrderNr = TempTable.OrderNr
SET Table1.CurrentPrice = TempTable.MaxPrice
In reality the subquery to which I am inner joining is far more complicated,
but this simplified version also results in a read-only subquery that serves
as a basis for joining to the table that is to be updated.
How can this be done? I assume it just needs to be written differently. Any
help would be greatly appreciated!!
-- Hans De Schryver
fields need to be updated with values from fields in the complex query.
Trying to run the update query results in the "Query must use updateable
query" message.
The basic outline of my query is as follows:
UPDATE Table1
INNER JOIN ((SELECT DISTINCT OrderNr, Max(Price) AS MaxPrice FROM Table2
GROUP BY OrderNr) AS TempTable)
ON Table1.OrderNr = TempTable.OrderNr
SET Table1.CurrentPrice = TempTable.MaxPrice
In reality the subquery to which I am inner joining is far more complicated,
but this simplified version also results in a read-only subquery that serves
as a basis for joining to the table that is to be updated.
How can this be done? I assume it just needs to be written differently. Any
help would be greatly appreciated!!
-- Hans De Schryver