Do one of the following:
- Select .
- Press F2.
- Right-click in the Query window and select Query Builder.
From the drop-down list, select a statement type.
See the Query Builder Statements table below for a description of the statement types.
Do one of the following to move the statement to the Query window:
- Double-click the statement in the left pane.
- Right-click the statement for the following options:
- Insert into query – Inserts the statement the Query window
- Replace query – Replaces the statement in the Query window
- Copy to clipboard – Copies the statement to the Clipboard
- Drag and drop the statement into the Query window (insert it where you like).
Build statements as desired.
To learn more about building custom SQL Sets, see also Creating Custom SQL Sets.
Query Builder Statements 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 drop-down list.When connected to a database, you can display the full syntax for the selected statement by doing one of the following:
- Pressing F5
- Right-clicking the Statement list item and selecting Show Syntax.
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 CREATE or REPLACE procedure statement.
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 a list. 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 Creating Custom SQL Sets.
The state of the Query Builder window (its size, and the 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.