Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

nlserver sql syntax

Avatar

Level 1

Hi,

According to the nlserver manual it should be possible to execute sql with nlserver sql.

What is the proper syntax for doing this in a linux environment (build 9356)?

What I have tried so far, without success:

nlserver sql -instance:instance_name "SELECT iworkflowid FROM xtkworkflow WHERE sinternalname = 'workflowname'"

 

I have also tried putting the query in a file, without success:

nlserver sql instance:instance_name -file:"/usr/local/neolane/query.sql"

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @LukasPe1,

 

The nlserver sql can be used to execute sql object from adobe campaign. Bellow an exemple :

I've created a sql object in the console to insert a row in a table :

Amine_Abedour_0-1709994491147.png

 

i can execute this script using nlserver sql as bellow :

Amine_Abedour_1-1709994581668.png

result the row is inserted in my table :

Amine_Abedour_2-1709994685910.png

You can also use nlserver sql to execute sql code stored in a file on the server.

I've created a file with sql code to delete previously creates row :

Amine_Abedour_3-1709994793690.png

i can execute it as bellow : 

Amine_Abedour_4-1709994879936.png

 

result the row is deleted from my table :

 

Amine_Abedour_5-1709994930076.png

 

Br,

 

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @LukasPe1,

 

The nlserver sql can be used to execute sql object from adobe campaign. Bellow an exemple :

I've created a sql object in the console to insert a row in a table :

Amine_Abedour_0-1709994491147.png

 

i can execute this script using nlserver sql as bellow :

Amine_Abedour_1-1709994581668.png

result the row is inserted in my table :

Amine_Abedour_2-1709994685910.png

You can also use nlserver sql to execute sql code stored in a file on the server.

I've created a file with sql code to delete previously creates row :

Amine_Abedour_3-1709994793690.png

i can execute it as bellow : 

Amine_Abedour_4-1709994879936.png

 

result the row is deleted from my table :

 

Amine_Abedour_5-1709994930076.png

 

Br,

 

 

 

Avatar

Level 1

@Amine_Abedour  Thanks for the thorough explanation! Do you know if it is possible to make a SELECT query directly in the terminal on the server, with the nlserver command, so that I can save the result into a variable?