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

SOLVED

Help with simple SQL activity script

edwardr28531298
Level 2
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.

query sql
1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
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
wodnicki
Correct answer by
Community Advisor
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

edwardr28531298
Level 2
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?
edwardr28531298
Level 2
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!
wodnicki
Community Advisor
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.