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

The 4th edition of the Campaign Community Lens newsletter is out now!
SOLVED

Help with simple SQL activity script

Avatar

Level 2

Hello, I would like some more information on how to use the SQL activities in adobe campaign classic.

let's say for example Instead of using the generic query editor to query the recipient's table for email = "helloworld@123domain.com" I wanted to use the SQL activity and write:

SELECT T0.[iRecipientID], T0.[sEmail] FROM [neolane_application].[NmsRecipient] T0 WITH (NOLOCK) WHERE T0.[sEmail] IN ('helloworld@123domain.com')

 

the activity runs without any errors, but it does not return an actual result much as the normal query activity would, it just flashes blue as it ran successfully.

is there something else that needs to be added to the SQL activity? thank you.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

Use a 'JavaScript code' activity in a workflow. Return value will be in the Audit tab of the workflow:

logInfo(sqlGetString('select ...'))

 

Thanks,

-Jon

4 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

Use a 'JavaScript code' activity in a workflow. Return value will be in the Audit tab of the workflow:

logInfo(sqlGetString('select ...'))

 

Thanks,

-Jon

Avatar

Level 2
Hello, thank you. Is there a reason why the SQL activity is not a good option for something like this? what would typically be a good use for the sql activity then?

Avatar

Level 2
Hello, thank you. Is there a reason why the SQL activity is not a good option for something like this? what would typically be a good use for the sql activity then? thanks!

Avatar

Community Advisor
It's if you want to disable js permissions for the user? Not clear what org's security policy would say no js but sql's fine, esp since users can just 'update xtkoperatorgroup set myself=admin', but I could see it.