15.00 - Comments - MultiLoad

Teradata MultiLoad Reference

prodname
MultiLoad
vrm_release
15.00
category
Programming Reference
featnum
B035-2409-034K

Comments

Table 12 lists descriptions of C language style comments supported in Teradata MultiLoad.

 

Table 12: Notes About Teradata MultiLoad Comments  

Comment Topic

Description

Beginning and Ending Delimiters

A comment begins with a slash-asterisk (/*) character sequence and ends with an asterisk-slash (*/) sequence. All intervening text is treated as a comment.

Comment Destinations

Comments are always written to the message destination and they may or may not be sent to Teradata Database.

Comments that are followed by a semicolon character are considered to be stand alone:

/*Comment text*/;
CREATE TABLE table1(f1 INTEGER);

In this case, the comment is not associated with the SELECT statement and is not sent to Teradata Database.

Comments that are not followed by a semicolon character are considered to be part of the following command or statement:

/*Comment text*/
CREATE TABLE table1(f1 INTEGER);

In this case, the comment is associated with the SELECT statement and is sent to Teradata Database.

Invalid Within String or Character Literals

Comments cannot occur within string or character literals. A /* within a quoted string is not treated as the beginning of a comment.

Nested Comments

Teradata MultiLoad supports nested comments, but Teradata Database does not.

Always delimit nested comments with a semicolon character.

If a semicolon is not used to delimit a nested comment, it is considered to be part of the current command or statement. If that happens to be a Teradata SQL statement, it is sent to Teradata Database, producing a syntax error.

Using Comments With Teradata SQL Statements

If a comment with a Teradata SQL statement is used, add a semicolon to the end of the comment if the comment should not be sent to Teradata Database.

If a semicolon is not used, Teradata MultiLoad sends the comment to Teradata Database along with the Teradata SQL statement.

Variable Substitution

Substitution of values for variable names continues within comments. Use two ampersand characters (&&) when the variable name is required.