Re: "Query must use updateable query" error message
- From: "mac" <none@xxxxxxxx>
- Date: Fri, 15 Sep 2006 07:36:37 -0700
I just ran into this same issue yesterday. I found that the "source" query
(the one from which I want to draw the update values) must be an actual
table, not any type of query.
No matter how I messed around with the syntax, I got the same message you
are getting. Then, I instantiated the source query as a table. I was then
able to run the update statement.
Thanks,
Mac
"Marc De Schrijver" <marc.deschryver1@xxxxxxxxxx> wrote in message
news:ezoMg.66289$3B5.1128558@xxxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- "Query must use updateable query" error message
- From: Marc De Schrijver
- "Query must use updateable query" error message
- Prev by Date: Lookups with Composite primary keys - How To?
- Next by Date: To everyone that helped
- Previous by thread: Re: "Query must use updateable query" error message
- Next by thread: Expression to grandfather expiration by date
- Index(es):