Expand my Community achievements bar.

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

View solution in original post

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

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?
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.