Defining SQL commands
From the Object Properties window you can access the Define SQL Command dialog. This dialog is used to assign SQL commands allowing you to issue commands from within a dashboard.
To assign SQL commands
1. Right-click the appropriate command property in the Object Properties window and select Define Command > SQL.
The Define SQL Command dialog displays, which provides a drop down menu with available databases and a field to enter a SQL statement.
2. In the Database Name drop down menu, enter the name of database to query.
The Database Name drop down menu lists all available databases. The Database Name field automatically displays the name of the default database. If the item you require is not listed, type your selection into the field. Drop down menus populate based on databases added from the Application Options dialog or those typed directly into the Database Name field.
3. In the SQL Command field, enter a SQL statement to run using standard SQL syntax.
Note:
This option is for advanced users, SQL syntax will not be validated or checked for errors.
4. In the Queries field, if Run Affected Queries After Command is selected, Apama immediately runs all queries, including static queries, that use the database table modified by the command. This causes table changes to be displayed immediately, rather than waiting for the next scheduled query update.
This option is only supported for update, insert, and delete operations in which the name of the database table to be modified is specified explicitly. If a command performs another SQL operation (such as running a stored procedure that modifies tables), the results of the operation will not be displayed until the next scheduled update of each affected query. Display of the modified data may be delayed for other reasons, for example, if the database does not commit the results immediately and instead returns the old data on the next query.
5. Do not modify the Data Server field.
6. Click OK to apply the value and close the dialog.
You can also choose the following:
Apply: Applies values without closing the dialog.
Reset: Resets all fields to last values applied.
Clear: Clears all fields. Detaches object from assigned command (once
Apply or
OK is selected).
Cancel: Closes the dialog with last values applied.