Using the REPEAT Command when Importing a File - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2414
lifecycle
previous
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.

Note: 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.