MS Access column manipulation

Hi,
I have a MS Access db with two tables.  One table has data in the records such as this:

Table 1

Column1       Column2         Column3
Food      AIRFRSPL      GIANT      

The other table has translation data in it such as this:

Table 2

Column1        Column2
AIRFRSPL      Air Freshener      
ANALGESC      Analgesic      
ANLGSCPL      Analgesic      

What I need to do is to match the data in  Table2 Column1 with Table1 Column2 and then update the values in Table1 Column2 with the values in Table2 Column2. I need to do this for all the records in Table1.

I would like to do this using Sql query.

Thanks!
trmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cyberkiwiCommented:
update tbl1
set column2 = dlookup('column2', 'tbl2', "column1='" & replace(column2, "'", "''") & "'")

Open in new window

0
cyberkiwiCommented:
The above query sets column2 to NULL if it is not found in table2.column1

This one below only updates where table1.column2 is found

UPDATE tbl1 INNER JOIN tbl2 ON tbl1.column2 = tbl2.column1
SET tbl1.column2 = tbl2.column2;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.