Advanced Scripting

The possibilities in the 'Advanced scriptingsection are based on two user rights:

  • Execute (protected mode): Create simple SELECT queries with maximum execution duration of two minutes
  • Execute (Advanced mode):Advanced queries(CREATE, INSERT, UPDATE, DELETE) are possible and you can increase the maximum execution time allowed. System tables can be queries but with limited possibilities.

Note: 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: increases the max execution time and allows advanced queries for INSERT/CREATE/UPDATE/DELETE
  • 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 large queries are run, toggle the 'Advanced mode' button in the toolbar. Advanced mode allows exceeding the maximum allowed execution time of 2 minutes.

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: