UPDATE QUERY USING TO DIFFERENT TABLES

G

Guest

Hello there,
I'm using two tables Table1,Table2.
Table1 has fields:ID Autonumber
CODE1 text
TIMH1 number

Table2 has fields :ID Autonumber
CODE2 text
TIMH2 number

Fields CODE1 and CODE2 have many rows in common but CODE1 has more rows than
CODE2 while TIMH1 has the prices and TIMH2 is empty for now.
I want to update the field TIMH2 with the values from TIMH1 based on the
similarity of fields CODE1,CODE2.
For that i'm using the "Update To" query.

Is there any help on that???What do i use in the "update to" field in the
query design
and what do i use in the criteria design????

Looking forward for ur precious advice and help
Thank u in advance

Stavros Zacharopoulos

CRETA SUPPLIES
 
R

Rick Brandt

cretesupplies said:
Hello there,
I'm using two tables Table1,Table2.
Table1 has fields:ID Autonumber
CODE1 text
TIMH1 number

Table2 has fields :ID Autonumber
CODE2 text
TIMH2 number

Fields CODE1 and CODE2 have many rows in common but CODE1 has more
rows than CODE2 while TIMH1 has the prices and TIMH2 is empty for now.
I want to update the field TIMH2 with the values from TIMH1 based on
the similarity of fields CODE1,CODE2.
For that i'm using the "Update To" query.

Is there any help on that???What do i use in the "update to" field in
the query design
and what do i use in the criteria design????

Please test on COPIES of your tables.


UPDATE Table2 INNER JOIN Table1
ON Table2.CODE2 = Table1.CODE1
SET Table2.TIMH2 = Table1.TIMH1
 

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

Top