Updateable Query ?

J

jfp

I want to have an Update Query where the data source is a Select Query
-- something like this:

UPDATE SomeTable INNER JOIN SomeQuery ON SomeTable.FieldA =
SomeQuery.FieldA
SET SomeTable.FieldB = SomeQuery.FieldA ;

When i try to run it, i get this error:
"Operation must use an updateable query"

WHY? I am NOT trying to update the query.

ALSO -- what is an "updateable query" ?
 
K

Ken Snell

In order to use a query to update a table's data, the query must be an
"updateable query". This term means that the query must be able to uniquely
identify each record in the tables so that it knows which record's value(s)
are to be changed.

The reasons for why a query may be nonupdateable are varied and sometimes
not obvious. See these links for more info (watch for word- and
line-wrapping; all URLs are one line):

"When can I update data from a query?"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/htm
l/acconDeterminingWhenCanUpdateDataQueryS.asp


"Harnessing the Power of Updatable Queries"
http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaraccgen/
html/msdn_harness.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top