15.00 - Chapter 4 Entering and Editing Teradata SQL Statements - Interactive Teradata Query Facility

Interactive Teradata Query User Guide

prodname
Interactive Teradata Query Facility
vrm_release
15.00
category
User Guide
featnum
B035-2452-034K

During an interactive session with the Teradata Database System (Teradata DBS), you may key a statement for entry in either the input area or the display area of the screen.

Normally, you execute ITEQ commands and enter Teradata SQL statements from the input area. When you enter a new statement from the input area, you may simultaneously view the result of the statement previously processed in the display area.

However, because the display area is usually larger than the input area, entering and editing a long Teradata SQL statement or macro from the display area may be more convenient because it enables you to view the statement in its entirety. Also, a statement or macro that is entered in the display area (or that is displayed there using the SHOW command) may be printed by executing the PRINT command.

You use ITEQ edit commands to help you key and edit Teradata SQL statements in the input area or the display area. Table 2 summarizes the commands that affect only the display area. Table 3 summarizes the ITEQ edit commands that apply to both the input area and the display area.

In these tables, any abbreviation allowed in keying a command is shown in parentheses following the command syntax.

 

Table 2: Edit Commands Only for Display Area 

Command

Function

INPUT;

Sets the display area for input.

SHOW;
(SHO;)

Redisplays the current statement in the display area so that it may be edited or printed.

SUBMIT;
(SUB;)

Executes a statement typed or edited in the display area.

You may execute an edit command by keying it in the input area and pressing ENTER to execute it. However, you may find it more convenient to press a PF key assigned to the command, as discussed later.

In general, successful execution of an edit command is indicated by an appropriate movement on the terminal screen. If successfully executed from the input area, a command is erased from that area upon execution. If the command fails, the cursor moves to the beginning of the input area and the unsuccessful command, if executed from that area, remains displayed.

 

Table 3: Edit Commands Used for Input, Display Areas 

Command

Function

ADD;

Adds one blank line following the line on which the cursor is positioned.

CLEAR INPUT;

Removes the current contents of the input area or the display area so that a new statement or command may be typed there.

DOWN[n];

Moves the display down three lines or n number of lines.

JOIN;

Appends the next line of characters to the cursor position on the current line, overlaying the cursor and erasing any characters to the right of the cursor. (You must assign a PF key to this command, as described later.)

REMOVE;

Removes the line on which the cursor is positioned.

SPLIT;

Creates a new line following the current line and moves characters right of (and including) the cursor to the new line. (You must assign a PF key to this command, as described later.)

UP [n]

Moves the display up three lines or n number of lines.