Hi Team,
I have requirement where I need to get the list of multiple rows for a single record in the same table into different column set of that record. This data will gather all the data from the different rows and merge it into a single row with different column. Fields are added in a different table as these filed are dynamic and further fields can be added.
Table1
Attribute_key Attribute_name
12 Name
13 Age
14 Gender
15 Occupation
table2
Record_key Attribute_key Attribute_value
1 12 XXX
2 13 21
3 14 Female
4 15 IT Engg
8 12 YYY
5 13 25
6 14 Male
7 15 CA
I want to get an output like this..
Name Age Gender Occupation
XXX 21 Female IT Engg
YYY 25 Male CA
so that in future if we want to add a new attribute we can add a new record in the table attribute instead of adding a new column in the table2
Thanks in Advance