Title Phrases - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

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 blank 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  

The next SELECT statement and response shows the technique of using titles comprised of blank 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  

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 
                   268,000.00 

Note: Title dashes can also be turned off for the summary text using the TITLEDASHES OFF command.