Update query

  • Thread starter Thread starter Domac
  • Start date Start date
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
 
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.
 
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]
 
Back
Top