Professional Documents
Culture Documents
The BTEQ commands in Teradata are designed for flexibility. These commands are not used directly on the data inside the tables. However, these 60 different BTEQ commands are utilized in four areas.
Session Control Commands File Control Commands Sequence Control Commands Format Control Commands
QUIT SECURITY
SESSION SQLFLAG Specifies a disposition of warnings issued in response to violations of ANSI syntax. The SQL will still run, but a warning message will be provided. The four settings are FULL, INTERMEDIATE, ENTRY, and NONE. SESSION TRANSACTION Specifies whether transaction boundaries aredetermined by Teradata SQL or ANSI SQL semantics.
SHOW CONTROLS Displays all of the BTEQ control command options currently configured. SHOW VERSIONS TDP Displays the BTEQ software release versions. Used to specify the correct Teradata server for logons for a particular session.
Figure 2-11
OS
or UNIX commandfrom inside BTEQ. QUIET REPEAT RUN TSO Limit BTEQ output displays to all error messages and request processing statistics. Submit the next request a certain amount of times Execute Teradata SQL requests and BTEQ commands directly from a specified run file. Execute an MVS TSO command from inside the BTEQ environment.
Figure 2-12
ERRORLEVEL Assign severity levels to particular error numbers. EXIT GOTO HANG IFTHEN LABEL MAXERROR QUIT REMARK REPEAT Figure 2-13 End the current session or sessions and exit BTEQ. Skip all intervening commands and resume afterbranching forward to the specified label. Pause BTEQ processing for a specific amount of time. Test a stated condition, and then resume processing based on the test results. The GOTO command will always GO directly TO aparticular line of code based on a label. Specifies a maximum allowable error severity level. End the current session or sessions and exit BTEQ. Place a comment on the standard output stream. Submit the next request a certain amount of times.
These commands control the formatting for Teradata and present the data in a report mode to the screen or printer. DEFAULTS ECHOREQ Reset all BTEQ Format command options to their defaults. This will utilize the default configurations. Enable the Echo required function in BTEQ returning a copy of each Teradata SQL request and BTEQ command to the standard output stream. Open a file with a specific format to transfer information directly from the Teradata database. Split or fold each line of a report into multiple lines. Specify a footer to appear at the bottom of every report page. Enable/inhibit the page-oriented format command options. Open a file with a specific format to transfer orIMPORT information directly to Teradata. One of multiple data mode options for data selected from Teradata. The modes areINDICDATA, FIELD, or RECORD MODE. Specifies a character or string of characters torepresent null values returned from Teradata. Omit specific columns from a report. Ejects a page whenever a specified column changes values. Specifies the page length of printed reports based on lines per page. Limit BTEQ output displays to all error messages and request processing statistics. One of multiple data mode options for data selected from Teradata. (INDICDATA, FIELD, orRECORD). Cancel a request when the specified value of the RETLIMIT command option is exceeded.
INDICDATA
RETLIMIT
Specifies the maximum number of rows to bedisplayed or written from a Teradata SQL request. Retry requests that fail under specific error conditions. Specify a header appearing at the top of all pages of a report. Specifies a character string or specific width of blank characters separating columns of a report.
SHOWCONTROLS Displays all of the BTEQ control command optionscurrently configured. SIDETITLES SKIPLINE SUPPRESS TITLEDASHES UNDERLINE WIDTH Place titles to the left or side of the report instead of on top. Inserts blank lines in a report when the value of a column changes specified values. Replace each and every consecutively repeated value with completely-blank character strings. Display dash characters before each report linesummarized by a WITH clause. Display a row of dash characters when the specified column changes values. Specifies the width of screen displays and printed reports, based on characters per line.