Title Phrases

Basic Teradata Query Reference

brand
Teradata Tools and Utilities
prodname
Basic Teradata Query
vrm_release
16.20
category
Programming Reference
featnum
B035-2414-108K

By default, when using Field Mode for response generation, BTEQ might not include the summary-text titles as returned by the database. The text returned depends on whether defaults are used or specific text is indicated through the WITH clause TITLE phrases or both.

In addition to specifying non-default title text, TITLE phrases can be used to completely eliminate specific summary-text titles from BTEQ results. This is done by specifying a title composed of space characters. Note, if a null title is specified (with no characters), the display of the summary-text title dashes are turned off as well as the title phrase.

Example – Suppress Summary Title with Blanks

The next SELECT statement and response shows the technique of using titles comprised of space characters to suppress summary title text generation in results.

SELECT
  empno, name, salary
FROM
  employee
WITH
    sum(salary)(title ' ')
WHERE
    DeptNo = 500;

BTEQ Response

*** Query completed. 8 rows found. 3 columns returned.
*** Total elapsed time was 1 second.
EmpNo Name            Salary
----- ------------ ----------
10014 Inglis C       34,000.00
10016 Carter J       44,000.00
10004 Smith T        42,000.00
10010 Reed C         30,000.00
10012 Watson L       56,000.00
10015 Omura H        40,000.00
10009 Marston A      22,000.00
                    ----------
                    268,000.00

Example – Suppress Summary Title with Null Titles

The following SELECT statement and response shows the technique of using null titles to suppress summary title dashes as well as summary title text generation in results.

SELECT
  empno, name, salary
FROM
  employee
WITH
  sum(salary)(title '')
WHERE
  DeptNo = 500;

BTEQ Response

*** Query completed. 8 rows found. 3 columns returned.
*** Total elapsed time was 1 second.
EmpNo Name             Salary
----- ------------ ----------
10014 Inglis C      34,000.00
10016 Carter J      44,000.00
10004 Smith T       42,000.00
10010 Reed C        30,000.00
10015 Omura H       40,000.00
10012 Watson L      56,000.00
10009 Marston A     22,000.00
Title dashes can also be turned off for the summary text using the TITLEDASHES OFF command.