table 1 prodkey field1 field2 field3
table 2 prodkey description fieldno
eg table1 prodkey field1 field2 field3
khc Joe bloggs 12
dir 07451254 red sally
table 2 prodkey description fieldno
khc name 1
khc surname 2
khc age 3
DIR tel 1
DIR colour 2
DIr name 3
output for product selected as khc
name surname age
Joe bloggs 12
output for product selected as dir
tel colour name
07451254 red sally
how do i query so that i get based on product codes, the heading names form table 2 with the data from table 1? selection will always be based on product, and only 1 product at a time?
i know this is unusual, the table is being populated from data where the fields coming through are unknown. This was a solution to stop testing every product for every description to see where to file it.
any help on query appreciated