SELECT Statement Clauses
The function syntax descriptions in this document are SQL SELECT statements. For simplicity, the descriptions do not show every possible SELECT statement clause. However, you can use any valid SELECT statement clauses. For information about SELECT statement options, see Teradata Vantage™ - SQL Data Manipulation Language , B035-1146 .
Many examples in this document use ORDER BY clauses that the function syntax descriptions do not show.
Function Syntax Element Order
OUT TABLE function syntax elements must appear above the USING clause, but they need not appear in the order shown in the function syntax description. All other function syntax elements must appear after the USING clause, but they need not appear in the order shown in the function syntax description.
Many examples in this document do not specify their syntax elements in the order shown in the function syntax description.
Input Table Aliases
When function syntax specifies aliases (also called correlation names) for input tables, use them as specified; otherwise, an error occurs.
For example, in the following clauses of a graph function, vertices is the alias of the input table containing the vertices of the input graph and edges is the alias of the table containing the edges connecting the vertices:
... ON vertices_table AS Vertices PARTITION BY ... ON edges_table AS Edges PARTITION BY ... ...
Using different aliases causes an error:
... ON callers AS vr PARTITION BY callerid ON calls AS edges PARTITION BY callerfrom ...
Error message: Number of ON clauses with undefined or empty correlation name does not match the number of ANY clauses in function mapping definition.
Function Syntax Element Values with Numeric SQL Types
For a function syntax element with any SQL numeric data type, surrounding single quotation marks are optional. For example, Seed (5) and Seed ('5') are equivalent. For information about SQL numeric data types, see Teradata Vantage™ Data Types and Literals, B035-1143.