Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How can i transpose this table?

gowthamanrajendran
Level 2
Level 2

 

ID  FirstName LastName Email

1   Name1       Name12    Email1

2   Name2       Name22    Email2

3   Name3       Name32    Email3

 

i want to convert above table into

 

ID   AttributeName   AttributeValue

1     FirstName        Name1

1     LastName        Name12

1     Email                Email1

2     FirstName        Name2

2     LastName        Name22

2     Email                Email2

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
Jonathon_wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

 

Repeat insert statements for each of your cols:

  • insert into new_eav_table (ID, AttributeName, AttributeValue)
    select ID, 'FirstName', FirstName from old_table
  • insert into new_eav_table (ID, AttributeName, AttributeValue)
    select ID, 'LastName', LastName from old_table
  • insert into new_eav_table (ID, AttributeName, AttributeValue)
    select ID, 'Email', Email from old_table 

 

You can also do this with select->update->update->update in a workflow.

 

Thanks,

-Jon

View solution in original post

3 Replies
Jonathon_wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

 

Repeat insert statements for each of your cols:

  • insert into new_eav_table (ID, AttributeName, AttributeValue)
    select ID, 'FirstName', FirstName from old_table
  • insert into new_eav_table (ID, AttributeName, AttributeValue)
    select ID, 'LastName', LastName from old_table
  • insert into new_eav_table (ID, AttributeName, AttributeValue)
    select ID, 'Email', Email from old_table 

 

You can also do this with select->update->update->update in a workflow.

 

Thanks,

-Jon

View solution in original post

gowthamanrajendran
Level 2
Level 2
Appreciate it. I am trying to do this with workflow. Anyway to do this with workflow enrichment?
Jonathon_wodnicki
Community Advisor
Community Advisor

No enrichment, just use ordinary query and update activities. For the query the filter is @ID > 0.