nlserver sql syntax | Community
Skip to main content
LukasPe1
Level 3
March 8, 2024
Solved

nlserver sql syntax

  • March 8, 2024
  • 1 reply
  • 764 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Amine_Abedour

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 :

 

i can execute this script using nlserver sql as bellow :

result the row is inserted in my table :

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 :

i can execute it as bellow : 

 

result the row is deleted from my table :

 

 

Br,

 

 

 

1 reply

Amine_Abedour
Community Advisor
Amine_AbedourCommunity AdvisorAccepted solution
Community Advisor
March 9, 2024

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 :

 

i can execute this script using nlserver sql as bellow :

result the row is inserted in my table :

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 :

i can execute it as bellow : 

 

result the row is deleted from my table :

 

 

Br,

 

 

 

Amine ABEDOUR
LukasPe1
LukasPe1Author
Level 3
March 11, 2024

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