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

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2020-02-20
dita:mapPath
kil1527114222313.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

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:

.REPEAT 7
=6

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;
=1

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.)