How to Use the REPEAT Command when Importing a File | Basic Teradata Query - Using the REPEAT Command when Importing a File - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

The REPEAT command appears before the request and specifies the total number of requests to be submitted.

The following BTEQ script using the BTEQ REPEAT command opens the character-format file RAISEEMP, and repeats the update sequence twice:

.IMPORT data file=raiseemp
.REPEAT 2
using enumb (char(5))
update workforce.employee set salary=salary*1.07
where empno = :enumb;

For each employee, BTEQ reads a value from the RAISEEMP file for the variable called enumb and carries out the UPDATE for the row whose EmpNo equals the value of enumb.

When using a file, originally exported with the BTEQ EXPORT command as the source for an IMPORT command across a different platform type, ensure that the endianness type of both platforms is the same. The SHOW CONTROLS command can be used to verify the byte order being used for BTEQ’s client platform. It is reflected in the command’s output within its “Client Platform Byte Order” section.