0

I have table-A as below (Original Image):

+ ---------------------------- + -------------------------- + ------------- + --------- + ---------- + --------- + ---------------------------- +
| id                           | property_name              | property_type | old_value | new_value  | flexfield | audit_entry_id               |
+ ---------------------------- + -------------------------- + ------------- + --------- + ---------- + --------- + ---------------------------- +
| adtc681050702060b5d7900029d3 | Assigned to                | String        |           | nxp29999   | f         | adte18d46dd91385221b300029ce |
| adtc59c67bc37a132c19a00029d2 | PT Status                  | String        | New       | Analyzing  | f         | adte18d46dd91385221b300029ce |
| adtc49bb8f9acbf7fd9fb00029d1 | Due Date                   | String        |           | 2016-09-27 | f         | adte18d46dd91385221b300029ce |
| adtc3b186528380a5e8fc00029d0 | To be solved in SW release | String        |           | 10.1       | f         | adte18d46dd91385221b300029ce |
+ ---------------------------- + -------------------------- + ------------- + --------- + ---------- + --------- + ---------------------------- +

Table-b - here i have each property in above table as an column. For example : "Assigned to" is a column name in table b and simllarly others

+ ----------- + --------- + -------- + -------------------------- +
| Assigned To | PT Status | Due Date | To be solved in SW release |
+ ----------- + --------- + -------- + -------------------------- +

How do i map them ??

KindaTechy
  • 1,041
  • 9
  • 25
Subrat Sahoo
  • 195
  • 1
  • 3
  • 17
  • possible duplicate of http://stackoverflow.com/questions/12808189/setting-column-values-as-column-names-in-the-sql-query-result – cornuz Mar 10 '17 at 17:11
  • @SubratSahoo You say that each property in Table A is a column in Table B and that you want to map values from one to the other. What values are you trying to map? Can you give us an example of your expected output? – KindaTechy Mar 10 '17 at 17:12
  • Is this the full schema of these tables, and is the column audit_entry_id also in Table B? That value is the same in table A which may indicate that the values in your example for table A are all for the same entity. – Ehz Mar 10 '17 at 21:54
  • @cornuz this helps. Thanks – Subrat Sahoo Mar 13 '17 at 13:34

0 Answers0