Update query

D

Domac

Update ProdajaRazrada INNER JOIN RebroZaUpdate ON
ProdajaRazrada.SifraNarucitelja = RebroZaUpdate.SifraNarucitelja
SET ProdajaRazrada.Specifikacija = RebroZaUpdate.Tekst


I can't execute this sample update query: Access 97 says :Opreation must use
an updatable query.


ProdajaRazrada is a table so i don't understand why it is not "updatable"
RebroZaUpdate is read-only aggregate query..


Please help!

Domac
 
B

Brendan Reynolds

You can probably do it with a sub-query ...

UPDATE ProdajaRazrada SET ProdajaRazrada.Specifikacija = (SELECT
RebroZaUpdate.Tekst FROM RebroZaUpdate WHERE RebroZaUpdate.SifraNarucitelja
= ProdajaRazrada.SifraNarucitelja)

Alternatively, you could make a make-table query out of the aggregate query,
and use the resulting table instead of the aggregate query in your update
query.
 
J

John Vinson

Update ProdajaRazrada INNER JOIN RebroZaUpdate ON
ProdajaRazrada.SifraNarucitelja = RebroZaUpdate.SifraNarucitelja
SET ProdajaRazrada.Specifikacija = RebroZaUpdate.Tekst


I can't execute this sample update query: Access 97 says :Opreation must use
an updatable query.


ProdajaRazrada is a table so i don't understand why it is not "updatable"
RebroZaUpdate is read-only aggregate query..

No Aggregate (totals) query is ever updateable, nor is any query
containing a Totals query - even if, as in this case, it logically
should be.

You may want to replace RebroZaUpdate by a DSum() function call.

John W. Vinson[MVP]
 

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