I have 2 tables.
Table 1 has Product ID and Product Name (each row has a unique Product ID).
1 Name1
2 Name2
3 Name3
Table 2 has Product ID and Color (Red, Green, Blue) and Price. There can be up to 3 rows with the same Product ID depending on what color the Product ID is associated with.
1 Red $6
1 Blue $2
2 Blue $3
3 Green $5
I want to query to create a new table with the following columns: Product ID, Product Name, RedPrice, GreenPrice and BluePrice. The 2 above samples result in:
1 Name1 $6 Null $2
2 Name2 Null Null $3
3 Name3 Null $5 Null
How do I do this query? Either SQL or Microsoft Access code is fine. Thanks.
Assuming there can be no more than one price of each kind per product: