Specifying Page Breaks

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, BTEQ uses all of the space available on each page for report information. Use the BTEQ PAGEBREAK command to force a page break and begin with a new page whenever the value of a specified column changes.

Example – PAGEBREAK

Replace the UNDERLINE command with a PAGEBREAK command in the previous example:

.SET PAGEBREAK ON 1
.SET SUPPRESS ON 1
select deptno, name from employee
where deptno in (100, 300) 
order by deptno;

The example above produces the following two-page report:

page 1:

DeptNo  Name
------  -----------
   100  Chin M
        Greene W
        Moffit H
        Peterson J

page 2:

DeptNo  Name
------  -----------
   300  Russell S
        Phan A
        Leidner P