Get selected values from one table, sort, copy and past into another table
Apr 27, 2020 2:01 PM(301 views)
I have two tables. The one i'm calling the big table has part numbers, prices, BLS index codes, and BLS index names. This table has a couple million rows duplicating the part number but different prices and BLS indices.
My small table has a few hundred rows of unique part numbers. Columns for BLS index and name, not populated.
I'd liketo populate the BLS index and name in small table with the BLS index and name from the same part number in the big table of the row with the highest price.
My plan was to:
1-select first part number from small table
2-select all rows in big table with matching part number.
3-Make a new table with the four columns
4-sort new table on price
5-select the highest prices BLS index code and name from the sorted table and paste into the smaller table corresponding to the part number.
Here's what i have but i'm stuck at trying to make the new table because i don't know how to copy more columns over. Any help would be greatly appreciated.