Advanced Scripting
The possibilities in the 'Advanced scripting' section are based on two user rights:
-
Execute (Protected mode): Create (simple) queries (SQL statements) and execute them one by one.
-
Execute (Advanced mode): Create and execute (advanced) queries (SQL statements). In Advanced Mode, multiple queries can be executed at once.
Another difference with Protected Mode is that some queries require the SHOWPLAN permission to work, which is only available in Advanced Mode.
Note: The execution timeout of a query in Campaign is fixed to 120 seconds.
Warning: It is not recommended to make changes to Selligent system tables, such as ACTIONQUEUE and FLAGS. This may result in Selligent functionality to not work properly. (E.g. deleting records from the FLAGS table could result in resending emails from the past.
The following options are available from the toolbar:
- New query sheet: creates a new sheet/tab where an SQL command can be created and executed.
- Execute: executes the selected SQL command
- Encode/Decode: allows encoding/decoding a string.
- Advanced mode: toggles between Protected mode and Advanced mode (see differences mentioned above)
- Generate differential DB Alterscript.
Multiple sheets can be created to design and view SQL commands. The button 'New query sheet' adds a new sheet (tab) at the bottom.
When a new tab is added a white canvas is displayed. Use it to enter the SQL command:
Execute the statement by pressing the 'Execute' button.
Note: When you want to execute multiple queries at once, toggle the 'Advanced mode' button in the toolbar so it's active.
The result of the execution is displayed:
A color code is used when statements are executed:
-
Green: execution succeeded
-
Yellow: execution is running
-
Red: execution failed
Note that a maximum of 10000 records can be retrieved.
When it exceeds that number, make sure to use 'top 10000' in your query.
Example : SELECT TOP 10000 * FROM TABLE
The result of an SQL command can be exported, to a file or to excel.
An export to file requires following export options: