Query
This tab makes it possible to enter a custom query for both MS SQL and
Oracle databases. The query is used for specifying the results that will
be displayed to the user on the grid.
The following query options are available:
- Test query on: drop-down
list – specifies the database connection alias
- Verify button – clicking
this tests the defined SQL statement on the database selected from
the Test query on: drop-down
list
- Execute button – clicking
this executes the defined query
- Break button – clicking
this cancels the query execution when it is in progress
When using a WHERE clause in the SQL statement, it is necessary
to include the proper tags exactly in the following form (anywhere in
the query): /* WHERE */.
The query is characterized by the following features:
- It is possible to use Session Variables by entering the "@"
character and choosing the desired item from the drop-down list
- Clauses such as GROUP
BY, ORDER BY, and HAVING can be used only in sub-queries, because
they may be in conflict with paging, sorting, and filtering
- Paging and sorting require unique column names to be in the following
form: TableName.ColumnName
- The column
names are used in
the WHERE and ORDER BY clauses added to the query
- Queries with calculated columns must be wrapped in a superior
query: SELECT *
FROM ( )