Access update select group


















If you want to update a table with the results of a query, you must insert the query results into a temporary table that can be defined with a one-to-many or one-to-one relationship with the target table and then use the temporary table to update the target. In the SET clause, you cannot specify a column name more than once. You also cannot specify the name of a multi-valued field, a calculated field, or an attachment field.

PersonId , PostCode , City. City ,. AddressList Addr. ON Per. ON Addr. PostCode ,. City ;. PostCode ;. SET Persons. Author Recent Posts. Esat Erkec. His current interests are in database administration and Business Intelligence.

You can find him on LinkedIn. View all posts by Esat Erkec. Latest posts by Esat Erkec see all. City , Per. PostCode , Per. What you need to do is use the results of a grouped query inside an update query. That either means a separate grouped query which is referenced by your update query, or it means a grouped subquery inside your update.

I'll show the latter as it is more direct. I'm not totally sure what 'clickable' means to you, but the 2 query approach should be easy enough to work out from the example with a subquery, if you prefer that instead. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 6 years, 1 month ago.

Active 6 years, 1 month ago. Viewed 4k times. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? In this article.



0コメント

  • 1000 / 1000