REMARK - 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

Purpose  

Places a specified string on the standard output stream.

Syntax  

where:

 

Syntax Element

Specification

//

Specifies a break between lines.

string

Represents the user-supplied comment text.

The string can contain a maximum of 253 characters and a maximum of nine break specifications to describe up to 10 lines.

Usage Notes  

Extra line separator characters are processed differently by mainframe-attached BTEQ than by workstation-attached BTEQ.

 

System Type

Description

mainframe-attached

BTEQ prints any additional line separator characters as string text.

workstation-attached

BTEQ truncates any additional line separator characters and text.

Do not use special characters within the string as they might be interpreted differently by different output devices. A script that uses special characters might have to be modified if the output is routed to another device.

If the string has an apostrophe (single quote) character, use the second form of the REMARK command (the one with quotes as delimiters) or double the apostrophe. For example:

   .REMARK "Here's where the two steps merge."

or

   .REMARK 'Here''s where the two steps merge.' 

If the string does not have an apostrophe, the two forms of the REMARK command are the same.

The REMARK command is valid in a Teradata SQL macro.

Breaking a Line

To break a remark line and begin a new line of remark text, insert a pair of slashes (//) at the designated break point. Up to nine line breaks (10 remark lines maximum) are valid within a REMARK command.

Example  

The following examples show the REMARK command with a properly formatted two-line string, and the same string improperly formatted with an additional pair of line separator characters:

   .REMARK 'This is a line of commentary//
    And another line too'
   
   .REMARK 'This is a line //of commentary//
    And another line//too' 
   

BTEQ Response

   This is a line of commentary
   And another line too 
   This is a line
   of commentary
   And another line

Example 2

The Example 1 commands in a Teradata SQL macro appear as:

   ECHO 'REMARK ''This is a line of commentary//
   And another line too'' ';
   
   ECHO 'REMARK "This is a line of commentary//
   And another line too" ';