Vertical Presentation - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.00
Published
November 2016
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
hyz1479325149183.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

Use the BTEQ FOLDLINE command to break each row of output data into two or more rows in the report. Using the FOLDLINE ON ALL form of the command effectively changes the format of the report from horizontal to vertical by reporting each column value on a new line.

Add a FOLDLINE command to the previous example to reformat the report as shown in the example report below:

.SET FOLDLINE ON ALL
SELECT Name, JobTitle, Sex
FROM Employee WHERE DeptNo = 300;

Example report:

Name     
------------ 
        JobTitle
        ------------
         Sex
         --- 
Russell S
        President
         M
Phan A
        Vice Pres
         F
Leidner P
        Secretary
         F

To reposition the column headings to the left of the rows, use the BTEQ SIDETITLES command, described in the following subsection.