Continuing SQL - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

Continuing SQL

A Teradata SQL request is automatically continued from one line to the next unless the line ends in a semicolon, a left or right parenthesis, or a single-quote or double-quote character. However, the following conditions are excluded:

 

Exceptions for Using Terminating Characters within SQL Requests

Example

Termination characters embedded within a comment.

exec    /* exec macro current; */
macro xyz;

Semicolon embedded in an unsatisfied parenthesis, or a single- or double-quote pair.

create macro xyz as
(select * from dbc.tables;  );

Left parenthesis, single-quote or double-quote character being the first of a pair whose companion has not yet appeared.

select * from dbc.tables 
where databasename='
alctest';