Loops in Syntax Diagrams | Teradata Reference - 17.00 - Loops - Basic Teradata Query

Basic Teradata® Query Reference

prodname
Basic Teradata Query
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2414-220K

A loop is an entry or a group of entries that you can repeat one or more times. Syntax diagrams show loops as a return path above the main path, over the item or items that you can repeat:


Example of using loops in a syntax diagram

Read loops from right to left.

The following conventions apply to loops:

If... Then...
there is a maximum number of entries allowed the number appears in a circle on the return path.

In the example, you may type cname a maximum of 4 times.

there is a minimum number of entries required the number appears in a square on the return path.

In the example, you must type at least three groups of column names.

a separator character is required between entries the character appears on the return path.

If the diagram does not show a separator character, use one space character.

In the example, the separator character is a comma.

a delimiter character is required around entries the beginning and end characters appear outside the return path.

Generally, a space is not needed between delimiter characters and entries.

In the example, the delimiter characters are the left and right parentheses.