Can anyone help write an update query based on two tables please:
table1 and table2 have exact same fields,
start date, end date, startPoint, and endPoint plus a few other fields...these 4 I gave are where the selection criteria comes into play..
I want to create an update query that takes data from table 2 and checks if all 4 values exist in table1, and if so updates the entire row in table1 with all values from table 2.
i.e.
startDT endDT startPT endPT rate
table1 6/1/2001, 6/10/2001, abcdef, defdef, 100
table2 6/1/2001, 6/10/2001, abcdef, defdef, 200
so it would check that those 4 values equal those in table1 and change table1's rate column value to 200...
I would then need to create an append query to add those that do not exist, but I am sure I can get that after looking at the update query...
thanks,
sm
table1 and table2 have exact same fields,
start date, end date, startPoint, and endPoint plus a few other fields...these 4 I gave are where the selection criteria comes into play..
I want to create an update query that takes data from table 2 and checks if all 4 values exist in table1, and if so updates the entire row in table1 with all values from table 2.
i.e.
startDT endDT startPT endPT rate
table1 6/1/2001, 6/10/2001, abcdef, defdef, 100
table2 6/1/2001, 6/10/2001, abcdef, defdef, 200
so it would check that those 4 values equal those in table1 and change table1's rate column value to 200...
I would then need to create an append query to add those that do not exist, but I am sure I can get that after looking at the update query...
thanks,
sm