Stored Procedure Compilation - 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

Stored Procedure Compilation

The Stored Procedure Language (SPL) compilation errors and warnings are reported by the Teradata Database as part of the SUCCESS or OK parcel in response to the COMPILE command.

All syntax and semantic errors in the stored procedure source text are reported with a non-zero warning code. The activity count is set to the total number of compilation errors and warnings.

The Teradata Database server reports SPL compilation errors and warnings, which are stored in a buffer. If the errors and warnings exceed the buffer size limit, the server returns only the errors and warnings stored in the buffer. Additional errors and warnings are not stored in the buffer or returned to the user, including, the last error or warning text, if it does not fit in the buffer. A message is displayed when too many compilation errors occur. Refer to the DBS Reference Manual for additional details, including the current buffer capacity.

The stored procedure is not created or replaced if compilation errors are found. Instead, the stored procedure is created or replaced if compilation warnings are found, and no failures are reported.

Structure

SPL compilation error or warning messages are uniquely identifiable. The error code begins with "SPL", followed by a four-digit number.

This number is followed by an “E” for error, or “W” for warning. A line number in parenthesis identifies where the error or warning was detected in the stored procedure source text. The appropriate error or warning text follows the code.

Response Mode

The organization of the SPL compilation errors and warnings in the response depends on the response mode in which the COMPILE request was submitted.

 

Response Mode

Result

Field

Each error or warning is displayed as a row on a separate line. The error or warning text is in a readable format.

Record, Indicator, or Multipart Indicator

Each error or warning is organized as a series of bytes in a data parcel. BTEQ interprets each data parcel and prints the errors and warnings.