Hi everyone!
Any help would be appreciated with this one. Please see below.
How will can i
- Update the PRICE column in table 2.
That is, where the AVG(PART_NO) in table1 to TABLE2
where table2.PART_NO = table1.PART_NO
1. I.e i want to first calculate all the records containing a specific PART_NO in table1 to get the AVARAGE price here.
2. Then i want to store this AVG-price where
part_no matches in both tables.
I'm using SQL Server 7.0.
Here are the tables and and example of what it can contain:
[TABLE1].
part_no
original_part_no
manufacturer
price
PART_NO, ORIGINAL_PART_NO, MANUFACTURER, PRICE
100, 12345, Man1, 5000$
100, 11111, Man2, 4500$
100, 22222, Man3, 5600$
[TABLE2]
part_no (PK) Unique value.
original_part_no
manufacturer
priceE
PART_NO, ORIGINAL_PART_NO, MANUFACTURER, PRICE
100 (PK),12345, Man1, 5000$
Any help would be appreciated with this one. Please see below.
How will can i
- Update the PRICE column in table 2.
That is, where the AVG(PART_NO) in table1 to TABLE2
where table2.PART_NO = table1.PART_NO
1. I.e i want to first calculate all the records containing a specific PART_NO in table1 to get the AVARAGE price here.
2. Then i want to store this AVG-price where
part_no matches in both tables.
I'm using SQL Server 7.0.
Here are the tables and and example of what it can contain:
[TABLE1].
part_no
original_part_no
manufacturer
price
PART_NO, ORIGINAL_PART_NO, MANUFACTURER, PRICE
100, 12345, Man1, 5000$
100, 11111, Man2, 4500$
100, 22222, Man3, 5600$
[TABLE2]
part_no (PK) Unique value.
original_part_no
manufacturer
priceE
PART_NO, ORIGINAL_PART_NO, MANUFACTURER, PRICE
100 (PK),12345, Man1, 5000$