Query to divide numbers from one table by another, and insert into a third

jcuoco78

New Member
Joined
Feb 5, 2016
Messages
29
Hello,

I have an Access database that I am creating that I need to take values from multiple tables and divide one by another then insert it into a third table. All three tables have a column for part number which will be the driver. I need to take the value of the week column from table1 and divide it by footage column in table2, then insert it into the week column in table3.

So for example, I have part number 123 where I have 30,000 in the week column of table1, 300 in the footage column in table2. I need to enter the value 100 into table 3 in the row that matches the part number 123. I have been able to do this with a single part number but I want the query to loop through every line and update all of them without having to enter every part number 1 by 1. Is there a way to do this?
 
I would be pretty worried if you expect 44 rows to update and it's updating 110. It probably means table3 contains duplicate part numbers... The query will update all of them. You maybe want to include a where clause to exclude records that already have a value in the week field.
 
Last edited:
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,221,692
Messages
6,161,327
Members
451,697
Latest member
pedroDH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top