How to Delete Duplicated Data | Basic Teradata Query - Deleting Duplicated Data - Basic Teradata Query

Basic Teradata® Query Reference

Product
Basic Teradata Query
Release Number
17.00
Published
December 2020
Language
English (United States)
Last Update
2020-12-12
dita:mapPath
zqt1544831938740.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

The BTEQ SUPPRESS command deletes duplicated data by replacing all consecutively repeating values with space characters in the output reports.

Example – SUPPRESS

Without using the SUPPRESS command, for example, the following SELECT statement produces the example report shown below:

select deptno, name from employee
where deptno in (100, 300) 
order by deptno;

Example report:

DeptNo  Name
------  -----------
   100  Chin M
   100  Greene W
   100  Moffit H
   100  Peterson J
   300  Russell S
   300  Phan A

Adding a BTEQ SUPPRESS command produces the example report shown below:

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

Example report:

DeptNo  Name
------  -----------
   100  Chin M
        Greene W
        Moffit H
        Peterson J
   300  Russell S
        Phan A
        Leidner P

Eliminating the duplicated department numbers in the first column makes it easier to see the break between Dept. 100 and Dept. 300.