SKIPDOUBLE

Basic Teradata Query Reference

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

Purpose

This control enables users to specify whether two blank lines are to be inserted in a report whenever the value of the indicated column changes.

Syntax



where the following is true:

n
Column numbers are ordered from left to right and separated by a comma or one space.

The value of n can range from 1 to 2048.

Usage Notes

Use the SKIPDOUBLE command to insert blank space between different sections of a report. BTEQ inserts two blank lines 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 the ALL option of the SKIPDOUBLE command is specified, BTEQ triple spaces the report. If the ALL option is specified for both the SKIPDOUBLE command and the SKIPLINE command, BTEQ quadruple spaces the report.

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

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

The SKIPDOUBLE command can be used in a Teradata SQL macro.

Example 1 – SKIPDOUBLE

In the following example, the first SELECT operation omits the SKIPDOUBLE command and the second SELECT includes it.

database workforce;    
.defaults    
.format on    
select   name      
,empno      
,deptno     from     employee    
order by deptno    
;    
.defaults    
.format on    
.heading "set skipdouble all"    
.set skipdouble all    
= 1    
.format off

BTEQ Response

*** Query completed. 21 rows found. 3 columns returned.
90/07/24 select name, empno, deptno from employ ... Page 1
   
Name          EmpNo   DeptNo
------------  -----   ------
Peterson J    10001      100
Chin M        10011      100
Greene W      10017      100
Moffit H      10002      100
Russell S     10018      300
Leidner P     10003      300
   .
   .
   .
 (etc)
   
*** Query completed. 21 rows found. 3 columns returned.
   
Name          EmpN    DeptNo
------------  -----   ------
Peterson J    10001      100
   
   
Chin M        10011      100
   
   
Greene W      10017      100
   
   
Moffit H      10002      100
   
   
Russell S     10018      300
   
   
Leidner P     10003      300
   .
   .
 (etc)

Example 2 – SKIPDOUBLE

To print two blank lines when the value changes for columns 1 or 5, type the following:

.SET SKIPDOUBLE ON 1,5

Example 3 – SKIPDOUBLE instigated by a macro

The Example 2 SKIPDOUBLE command in a Teradata SQL macro appears as follows:

ECHO '.SET SKIPDOUBLE ON 1,5';