D
David McCulloch
I receive a spreadsheet that is imported into Access. Abstracted, its
format is (with column headers):
Part, Vendor1_Price, Vendor2_Price, Vendor3_Price, ...
Part1, $1000, $2000, $1500, ...
Part2, $5000, $5500, $6500, ...
Part3, $3000, $2500, $4000, ...
etc...
There are about 1,000 Parts and at least 12 Vendors that are subject to
change.
I want a query that creates a normalized version of the above data:
Part, Vendor, Price
Part1, "Vendor1", $1000
Part1, "Vendor2", $2000
Part1, "Vendor3", $1500
Part2, "Vendor1", $5000
Part2, "Vendor2", $5500
Part2, "Vendor3", $6500
Part3, "Vendor1", $3000
Part3, "Vendor2", $2500
Part3, "Vendor3", $4000
I could create a table of Vendors and generate a query that would give me
all combinations of Parts and Vendors. Unfortunately, how would I set
Price? If Access queries supported something like "column indirection" or
dynamic column names, I could define the Price update field to be something
like "[tbl1.[tbl2.Vendor]&"_Price"]". In row1, that would substitute to
"[tbl1.Vendor1_Price]" and then to $1000.
Any suggestions?
Dave
format is (with column headers):
Part, Vendor1_Price, Vendor2_Price, Vendor3_Price, ...
Part1, $1000, $2000, $1500, ...
Part2, $5000, $5500, $6500, ...
Part3, $3000, $2500, $4000, ...
etc...
There are about 1,000 Parts and at least 12 Vendors that are subject to
change.
I want a query that creates a normalized version of the above data:
Part, Vendor, Price
Part1, "Vendor1", $1000
Part1, "Vendor2", $2000
Part1, "Vendor3", $1500
Part2, "Vendor1", $5000
Part2, "Vendor2", $5500
Part2, "Vendor3", $6500
Part3, "Vendor1", $3000
Part3, "Vendor2", $2500
Part3, "Vendor3", $4000
I could create a table of Vendors and generate a query that would give me
all combinations of Parts and Vendors. Unfortunately, how would I set
Price? If Access queries supported something like "column indirection" or
dynamic column names, I could define the Price update field to be something
like "[tbl1.[tbl2.Vendor]&"_Price"]". In row1, that would substitute to
"[tbl1.Vendor1_Price]" and then to $1000.
Any suggestions?
Dave