Negating Requests - 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

At times, while creating a request, it is necessary to negate a statement to avoid creating unintended results.

If a request is being created using BTEQ interactively, and the line of the request being entered contains an error, use the Backspace key to remove text until the error can be corrected. Finish re-entering valid text to complete the line, and press Enter to start the next line of the request.

However, if while entering a line, Enter is pressed before correcting the text in error, the Backspace key cannot be used to correct the error. In this case, use the following steps to correct this issue:

1 Continue the request with an additional statement that has invalid syntax.

2 Press Enter.

This causes all statements in the request to be invalidated.

Example  

If the following text is entered without pressing Enter after the final trailing semicolon, continue typing to add an additional, invalid statement.

SELECT DATE
;

Example of adding an invalid statement:

SELECT DATE
; junk ;

Press Enter. An error message similar to the following example is returned:

*** Failure 3706 Syntax error: expected something 
between ';' and the word 'junk'.
                 Statement# 3, Info =20