SKIPLINE - Basic Teradata Query

Basic Teradata Query Reference

Basic Teradata Query
Release Number
October 2018
English (United States)
Last Update
Product Category
Teradata Tools and Utilities


This control enables users to specify whether one blank line is to be inserted in a report whenever the value of the indicated column changes.



Column numbers are ordered from left to right and separated by commas.

The value of n can range from 1 to 2048.

Though using a comma as a separator character between column numbers is the preferred construction, a single space character can be used instead of a comma as a separator character in the BTEQ SKIPLINE command.

Usage Notes

Use the SKIPLINE command to insert blank space between different sections of a report. If specifying more than one column, BTEQ inserts a blank line when the value of any of the specified columns changes, or if the value of more than one column changes at the same time.

If specifying the ALL option of the SKIPLINE command, BTEQ double spaces the report. If specifying the ALL option of both the SKIPLINE command and the SKIPDOUBLE command, BTEQ quadruple spaces the report.

The initial configuration of the SKIPLINE command options are OFF and ALL. If ON or OFF are not specified, or column numbers are not included, BTEQ sets SKIPLINE to ON ALL.

When using the SKIPLINE and SUPPRESS commands together, the same columns specified for the SUPPRESS command are specified for the SKIPLINE command. For example, if specifying the following:

.set suppress on 1,2,3,4,5
.set skipline on 1,2,3

BTEQ sets columns 4 and 5 for the SKIPLINE command. To specify SKIPLINE for columns 1, 2, and 3, enter the following command lines:

.set suppress on 1,2,3,4,5
.set skipline off 4,5

Also, using the SHOW CONTROLS command after using the SUPPRESS command, BTEQ resets the SKIPLINE columns to the same as the SUPPRESS columns.

The SKIPLINE setting only affects the output for Field Mode, not Record Mode, Indicator Mode, or Multipart Indicator Mode.

The SKIPLINE command is valid in a Teradata SQL macro.

Example 1 – SKIPLINE

The following example shows the results for the selected information first with the SKIPLINE command option set to OFF, then set to ON for all columns, and then set to ON for column 1:

database workforce;
.format on    
.heading 'Skipline Off'
select   Proj_Id
,WkEnd     from     charges 
order by proj_id
.format on 
.heading "Skipline All"
.set skipline all
= 1  
.format on 
.heading "Skipline on 1" 
.skipline on 1 
= 1    
.format off 

BTEQ Response

*** Query completed. 24 rows found. 3 columns returned.
                          Skipline Off
Project      Employee        Week
Id                 Id      Ending
--------     --------    --------
AP1-0001        10015     83/02/18
AP1-0002        10010     83/02/18
AP1-0003        10019     83/02/11
AR1-0002        10015     83/02/25
AR1-0002        10010     83/02/18
AR1-0003        10019     83/02/04
ENG-0002        10004     83/07/29
*** Query completed. 24 rows found. 3 columns returned.
                             Skipline All
Project   Employee         Week
Id              Id       Ending
--------  --------     --------
AP1-0001     10015     83/02/18
AP1-0002     10010     83/02/18
AP1-0003     10019     83/02/11
AR1-0002     10015     83/02/25
AR1-0002     10010     83/02/18
AR1-0003     10019     83/02/04
ENG-0002     10004     83/07/29
ENG-0002     10016     83/01/14
ENG-0002     10016     83/05/20
*** Query completed. 24 rows found. 3 columns returned.
                            Skipline on 1
Project     Employee        Week
Id                Id      Ending
--------    --------    --------
AP1-0001       10015    83/02/18
AP1-0002       10010    83/02/18
AP1-0003       10019    83/02/11
AR1-0002       10015    83/02/25
AR1-0002       10010    83/02/18
AR1-0003       10019    83/02/04
ENG-0002       10004    83/07/29
ENG-0002       10016    83/01/14
ENG-0002       10016    83/05/20
ENG-0003       10016    83/02/25
ENG-0003       10004    83/11/18
EO1-0001       10010    83/10/07

Example 2 – SKIPLINE instigated by a macro

The Example 1 SKIPLINE command in a Teradata SQL macro appears as follows: