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
BedrockMission!

Learn More

View all

Sign in to view all badges

How can i transpose this table?

Avatar

Avatar
Validate 1
Level 1
gowthamanrajendran
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
gowthamanrajendran
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
gowthamanrajendran
Level 1

04-02-2020

 

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

Adobe Campaign Adobe Campaign Classic

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

04-02-2020

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

Answers (0)