"update ta set ta.ra=1 from tablename ta" how can pass in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is it can be pass in the Access?
how to change?
thanks!



update ta
set col = t.col
from ta,(select id,max(col) col from tb
group by id) t
where ta.id = t.id
 
UPDATE ta SET col = DMAX("col" , "tb", "id=" & id )


or (untested)



UPDATE ta INNER JOIN tb ON ta.id=tb.id
SET ta.col = tb.col
WHERE tb.col = ( SELECT MAX(col) FROM tb AS c WHERE c.id = ta.id )



A Jet query implying an aggregate (elsewhere than in a sub-query in the
WHERE clause) is NOT updateable.


Vanderghast, Access 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

Back
Top