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

Grouping data into a comma-separated string

Avatar

Avatar
Validate 1
Level 1
Bowenaus
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Bowenaus
Level 1

Likes

0 likes

Total Posts

15 posts

Correct Reply

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

09-09-2020

Hello,

 

We have a need for a workflow which is capable of replicating the Group_CONCAT() function in SQL.

 

All of the "Group By" options I've seen in Adobe Campaign are just capable of aggregating #s together but I can't find anything which can concatenate strings into a comma-separated string like this example:
 
 
EMP_ID FNAME LNAME DEPT_ID STRENGTH
1mukeshgupta2Leadership
3neelamsharma3Hard-working
1mukeshgupta2Responsible
2deveshtyagi2Punctuality
3neelamsharma3Self-motivated
1mukeshgupta2Quick-learner
4keshavsinghal3Listening
2deveshtyagi2Quick-learner
5tanyajain1Hard-working
4keshavsinghal3Critical thinking
5tanyajain1Goal-oriented

Queries:

  1. Using simple GROUP_CONCAT() function-
    SELECT emp_id, fname, lname, dept_id, 
    GROUP_CONCAT ( strength ) as "strengths" 
    FROM employee group by emp_id;

    Output:

    EMP_ID FNAME LNAME DEPT_ID STRENGTHS
    1mukeshgupta2Leadership, Resposible, Quick-learner
    2deveshtyagi2Punctuality, Quick-learner
    3neelamsharma3Hard-working, Self-motivated
    4keshavsinghal3Listening, Critical thinking
    5tanyajain1Hard-working, Goal-oriented
 

If anyone has any ideas on how to apply this logic using the targeting activities available in Adobe Campaign Classic, please let me know!

 

Source: https://www.geeksforgeeks.org/mysql-group_concat-function/#:~:text=The%20GROUP_CONCAT()%20function%2....

 

Thanks!

Austin B.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

254 likes

Total Posts

366 posts

Correct Reply

150 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

254 likes

Total Posts

366 posts

Correct Reply

150 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile
DavidKangni
MVP

09-09-2020

Hi Austin,

 

You can try Adding additional SQL functions 

 

Thanks,

David

Answers (0)