Run query on SSP database

From SMT-X
Jump to: navigation, search

This example is to show how SSP can run a query directly on the database using a command line action. From a form data is given into the process and within the process we execute a step of the type "Execute external application". We start a batch file and provide the query to be executed to the external application through a variable.

The content of the batch file is like this:

 echo %1 >> D:\Script\ExecutionLog.txt
 sqlcmd -U USERNAME -P PASSWORD -S SERVERNAME -Q %1 >D:\Script\result.txt
 @type D:\Script\result.txt