Expandir la barra de logros de la comunidad.

Applications for the Community Advisor Program Class of 2025 are NOW OPEN – Apply Today!
RESUELTAS

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 solución aceptada

Avatar

Respuesta correcta de
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

Ver la solución en mensaje original publicado

4 Respuestas

Avatar

Respuesta correcta de
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.