SQL Advanced

Kalipso - Form - Actions - Actions Description - Group Database - SQL Advanced

Runs the specified query in the specified database. This Action allows you to run online queries without having to add Tables to a Database Connection Profile.

Action available for the following operating systems:

Parameters

Execution mode

  • Online - The query will be executed in the specified Database.

    • Database Connection Profile - Database Connection Profile where the query will be executed. It's not mandatory to have tables defined in the profile to be able to run this Action.

  • Offline - The query will be executed in the Local Database which holds all the offline Tables.

  • Clear Target When No Data is Returned - If this option is checked and no record is returned, all the Targets are cleared.

  • SQL Sentence <string> - SQL query to perform.

Targets

  • Column <unquoted string> - Name of the column to retrieve. This parameter is merely informative and has no impact whatsoever. What matters is the index of the Column. Therefore, this refers to the first returned Column.

  • Target <target> - Control or Variable where to save the value of the first Column.

  • nth Column <unquoted string> - Name of the column to retrieve. This parameter is merely informative and has no impact whatsoever. What matters is the index of the Column. Therefore, this refers to the nth returned Column.

  • nth Target <target> - Control or Variable where to save the value of the nth Column.

Usage

Consider the following Database Table, and the following Variables:

Consider that column Code is Numeric, column Name is String and column Stock is Numeric. Note that the table showing variables isn't a database table, its purpose is to show only the values and type of each variable.

Example 1

Result:

Example 2

Result:

Notice that, as you can see in the examples above, variable types are enforced, except if there is no result of the select operation or when parameter Clear Data isn't selected.

Last updated