Using Query Builder
Using Query Builder is an easy and convenient to build SQL statements in the Query window.
1 Open Query Builder by doing one of the following:
F2
.
2 From the drop-down list, select a statement type.
See “Table 14: Query Builder Statements” on page 93 for a description of the statement types.
3 Do one of the following to move the statement to the Query window:
4 Build statements as desired.
To learn more about building custom SQL Sets, see also “Creating Custom SQL Sets” on page 94.
Option |
Description |
SQL Statements |
When you select the SQL Statements option, the statement list in the left pane shows each of the statement types available on the current data source. When you select a statement in the list, an example of that statement appears in the area to the right. If you are not connected to any server, syntax is based on the server you were most recently connected to. If you are not connected to any server during the current Teradata SQL Assistant session, you receive the default Teradata syntax. You can customize the statement list or the examples using the tool buttons to the right of this dropdown list. When connected to a database, you can display the full syntax for the selected statement by doing one of the following: |
Procedure Builder |
Select a stored procedure statement from the list in the left pane to display an example of its syntax in the right pane. When you select the Procedure Builder option, the left pane shows a list of statements
that are valid only when used in a |
<User Defined> |
Additional user (or DBA) defined entries can appear after the above items. Each SQL Set must be given a name that appears in the dropdown list. When selected, the SQL Examples, snippits, or queries contained in that SQL Set appear in the List below. Each SQL Set is saved as a *.qbs file. This allows a DBA, or user, to create SQL Sets and easily distribute them to other users. For additional information, see also “Creating Custom SQL Sets” on page 94. |
Note: The state of the Query Builder window (its size, and which list you are viewing) is saved so that future uses of the Query Builder window start in the same state that it was last used in.