![]() |
|
![]() ![]() ![]() |
Working with Database Operations > Using the Database Operation File Editor > SQL Query Tab | |
![]() |
SQL Query Tab |
The SQL Query tab shows the query code to be sent to the SQL server when this database operation file is executed. This is helpful to verify that the database operation does what you expect it to do. (This assumes that you are familiar with SQL query commands and syntax.) By testing the SQL query before actually running the application, the designer can find problems in the logic earlier in the design process.
The query can be tested by clicking the Execute button, with the query results being returned in the grid below the button. Notice that the columns in the result grid match the returned columns in the select statement.
By plugging in different values for variables (through simple or compound logic defined in the Predicate tab, the value(s) is displayed in the Criteria Input field on the SQL Query tab), and upon executing, you can test the query and see the results.
In general, if there is an error when executing a Database operation, a message box is displayed with the error message.
By right-clicking in the grid, a Copy option is available for copying selected rows into Notepad.
Examples of supported SQL database operations follow.
With the combination of these supported operations, the database data can be easily manipulated without the need for an external tool:
Select SQL Query
For example:
Criteria Input Example:
Click Execute and the results grid indicates the First and Last Name for customer with the ID of 1 (John is the first name, and Jacobs is the last name in this example.)
Insert SQL Query
For example:
Criteria Input Example:
Click Execute and the results grid indicates the number of rows added (1, in this example).
Delete SQL Query
For example:
Criteria Input Example:
Click Execute and the results grid indicates the number of rows deleted (1, in this example).
Update SQL Query.
For example:
Criteria Input Example:
Click Execute and the results grid indicates the number of rows updated (1, in this example).
Stored Procedures SQL Query
Example 1:
Criteria Input Example 1:
Click Execute and the results grid indicates the result of the query.
Example 2:
Criteria Input Example 2:
Output Parameters:
Click Execute and the results grid indicates the result of the query.
![]() ![]() ![]() |
©2009, Avaya Inc. All rights reserved.
|