Forum Discussion

mynameiserr's avatar
mynameiserr
New Member
7 years ago
Solved

Convert data in rows to columns with attribute index

I need to convert data from a format where each row contains different data based on an attribute column into a proper table with the attribute column entries as new column headers.

 

Tried a few things without luck - like to have the done in query editor - any ideas?

 

accountIdATIDValue
1000004gp_dc_database_id5
1000004gp_dc_department_id26142
1000004gl_account5040
1000004gl_account_index26142-5040
1000004gp_customer_id00117
1000005gp_dc_database_id 
1000005gp_dc_department_id26142
1000005gl_account5040
1000005gl_account_index26142-5040
1000005gp_customer_id00009
1000006gp_dc_database_id5
1000006gp_dc_department_id26142
1000006gl_account5040
1000006gl_account_index26142-5040
1000006gp_customer_id00114
1000007gp_dc_database_id5
1000007gp_dc_department_id26142
1000007gl_account5040
1000007gl_account_index26142-5040
1000007gp_customer_id00017
1000008gp_dc_database_id5
1000008gp_dc_department_id26142
1000008gl_account5040
1000008gl_account_index26142-5040
1000008gp_customer_id00120

 

Desired

AccountIDgp_dc_database_idgp_dc_department_idgl_accountgl_account_indexgp_customer_id
1000004526142504026142-504000117
1000005 26142504026142-504000009
1000006526142504026142-504000114
1000007526142504026142-504000017
1000008526142504026142-504000120

2 Replies

    • mynameiserr's avatar
      mynameiserr
      New Member

      Yep, that worked -  I tried multiple times to pivot , concatenate etc etc - must be tired:)

       

      Most appreciated!