16.20 - Using the = Command When Importing a File - Basic Teradata Query

Basic Teradata Query Reference

Basic Teradata Query
October 2018
Programming Reference

The = command appears after the request and specifies one less than the total number of requests to be submitted, because the first request has already been submitted when the = command is stated.

The = command is used most often interactively to resubmit a SELECT statement that had run under the wrong formatting option. After obtaining output in an unexpected format, submit the BTEQ commands to correct the formatting options and then use the = command to get the reformatted output.

The value for the = command is 1 by default, which repeats the prior command one time only.

For example:


The following script, using the BTEQ = command performs the same update:

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

The choice between using the REPEAT command and the = command is a personal preference. The only differences between the two commands are in the value for the count field, and the default values.

Be aware when using the = command with a request containing statements other than a SELECT statement. Do not repeat requests that alter the database. (SELECT statements do not alter the database.)