Shorthand Syntax | Basic Teradata Query - Shorthand Syntax - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

Starting with BTEQ 20.00.00.03 and 17.20.00.10, shorthand syntax is supported for all BTEQ commands and their options.

The shorthand syntax is available only when BTEQ is running in interactive mode.
Shorthand syntax is not available for use when running in batch mode or when using a RUN file either in interactive or batch mode; because, a BTEQ script containing shorthand syntax might appear cryptic and difficult to understand and maintain and eventually conflicts with the reason of providing shorthand syntax.

Look out for the new initial interactive prompt “Enter your logon, BTEQ command or .h for help:” as opposed to the older prompt “Enter your logon or BTEQ command:” as an indicator that the version being used supports shorthand.

Like the existing BTEQ commands and their options, the shorthand syntax is not case sensitive.

Use the command-specific HELP to know the available shorthand for the commandand its options. For example, .HELP AUTOKEYRETRIEVE produces the following shorthand syntax:

Shorthand syntax (Interactive mode only):
  Command -
    AUTOKEYRETRIEVE  AKR
  Options -
    COLUMN  C | ROW  R
Starting with BTEQ 20.00.00.03 and 17.20.00.10, "BTEQ" keyword is optional in the .HELP BTEQ command.

Whenever a valid shorthand usage is identified in a BTEQ command, an expanded version of the complete instruction is printed after it has been acted upon, which can be controlled by the ECHOEXPANDEDREQ command.

For example, .H AKR produces the following shorthand syntax:

    *** Expanded Request Text:
   .HELP BTEQ AUTOKEYRETRIEVE

For example, .SH V produces the following shorthand syntax:

    *** Expanded Request Text:
   .SHOW VERSIONS

For example, .SH C S CS produces the following shorthand syntax:

    *** Expanded Request Text:
   .SHOW CONTROLS SESSION CHARSET

A consistent set of paradigms define the chosen shorthand for the commands, such that they are easy to deduce and are intuitive, rather than having to remember them (with a few exceptions). The shorthand for command options also follows similar paradigms with stress on lesser keystrokes, intuitiveness, and consistency.

The paradigms guiding the command shorthand are listed here:

  • First Character (FC)

    Premium single-character shorthand for frequently used commands.

    Command Shorthand Command Shorthand Command Shorthand
    COMPILE C DEFAULTS D EXPORT

    E
    FORMAT F HELP H IMPORT I
    LOGON L PACK P RUN R
    SESSION S TDP T WIDTH W
    QUIT/EXIT Q        
  • First Character of Every Word (FCEW)

    Majority of commands fall in this category.

    Command Shorthand Command Shorthand
    AUTOKEYRETRIEVE AKR BRANCHMSG BM
    COMMANDHISTORY CH DECIMALDIGITS DD
    ECHOEXPANDEDREQ EER ECHOREQ ER
    ENDIF EI ERRORLEVEL EL
    ERRORONDBSWARNING EODW ERROROUT EO
    EXITONDELAY EOD FOLDLINE FL
    FORMCHAR FC FULLYEAR FY
    INDICATORMODE IM LARGEDATAMODE LDM
    LOGDATA LD LOGMECH LM
    LOGOFF LO LOGONPROMPT LP
    MAXERROR ME MESSAGEOUT MO
    PAGEBREAK PB PAGELENGTH PL
    PREPAREMODE PM RECORDMODE RM
    REPORTALIGN RA RETCANCEL RC
    RETLIMIT RL RTITLE RT
    SIDETITLES ST SKIPDOUBLE SD
    SKIPLINE SL STATEMENTINDEPENDENCE SI
    TIMEMSG TM TIMEOUT TO
    TITLEDASHES TD TRAILINGLINES TL
    TRANSLATECTRLSTOSPACES TCTS TRIMTRAILINGSPACES TTS
    UNDERLINE UL    

    Secondary commands for HELP/SHOW:

    Command Shorthand Command Shorthand
    CHARSET CS RESPBUFLEN RBL
    SQLFLAG SF TRANS[ACTION] TA
    TWORESPBUFS TRB BTEQ B
    CONTROL[S] C ERRORMAP EM
    VERSION[S] V    
  • First Character of Every Syllable (FCES)

    Used where FCEW does not fit.

    Command Shorthand Command Shorthand
    FOOTING FT HEADING HD
    LABEL LB QUIET QE
    RECORDLENGTH RCL REPEAT RP
    REPEATSTOP RPS    
  • First Syllable (FS)
    Command Shorthand Command Shorthand Command Shorthand
    ENCRYPTION EN NOTIFY NO RETRY RE
  • Any Combination of Characters (ACC)
    Command Shorthand Command Shorthand
    CONNECTSTRING CST ELSEIF ELI
    EONRESPONSES EONR EQUAL EQ
    EXPORTEJECT EEJ REMARK REM
    SEPARATOR SEP SESSIONS SS
    SHOW SH SUPPRESS SUP
    TMSMMSG TMSM    
  • No shorthand for short enough or less commonly used commands.
    ELSE GOTO HANG IF NULL OMIT OS TSO
  • No shorthand for options like ON, OFF, ALL.