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 do i select values from enrichment to insert them into table using SQL code activity

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

10-02-2020

Hi ,

 

I am using SQL code activity to do insert into custom table . From the the below code i want the data from enrichment before sql code activity. Can some one give me sample query to fetch values from enrichment and insert into table. 

 

INSERT INTO Customtable(column1column2column3, ...)
SELECT column1(From enrichment)column2column3(From enrichment), ...
FROM enrichment.

 

 

Capture.PNG

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 10
Employee
craigthonis
Employee

Likes

155 likes

Total Posts

241 posts

Correct Reply

141 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Boost 50
View profile

Avatar
Give Back 10
Employee
craigthonis
Employee

Likes

155 likes

Total Posts

241 posts

Correct Reply

141 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Boost 50
View profile
craigthonis
Employee

11-02-2020

Hi,

 

If you are trying to view the data being inserted then you can either perform a preview, or you can execute the workflow to the point where the enrichment runs, then simply right click on the output transition from the enrichment.  This will allow you to view the data and export it if desired.

 

When it comes to inserting the data, I would not recommend using the SQL Code activity but instead using the update data activity.  The SQL activity doesn't actually execute SQL within the activity itself but calls upon templates (see documentation below):

https://docs.adobe.com/content/help/en/campaign-classic/using/automating-with-workflows/action-activ...

 

Regards,

 

Craig

Answers (0)