Avatar of skull52
Flag for United States of America asked on

Update target table column value when source table column value is different

I have an access table tbl_Items_UPC (Target Table) with a QTYONHND column that I want to only update from dbo_SSG_UPC_SCAN (Source Table) when the source value changes. I work mostly with SQL and it has a MERGE function that does that very well. I suspect that I would have to use an update query in access to accomplish this, I have tried a couple of queries but it didn't seem to work. I am using Access 2016
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon
Paul Cook-Giles

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Hamed Nasr

Agree with Paul's comment.
Here is an application to table a(aid, f) as source, and table b(aid, f1) as target.
Need to update f1 in target when f1 is different.
UPDATE b AS target INNER JOIN a AS source ON target.aid = source.aid SET target.f1 = source.f1
WHERE (((target.f1)<>[source].[f1]));

Open in new window


Thanks Paul, I should have figured that out, that is how I would have done in in SQL if I didn't use  SQL's MERGE Function
Your help has saved me hundreds of hours of internet surfing.