SQL Operations on Stored Procedures | Teradata Vantage - SQL Operations on Stored Procedures - Teradata Vantage - Analytics Database

SQL Stored Procedures and Embedded SQL

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
frc1628111662093.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
rjx1472253414573
lifecycle
latest
Product Category
Teradata Vantageā„¢
The following SQL statements execute DML, DDL, Help, and Show operations on stored procedures. You can submit most of these statements from any application on Teradata client utilities or interfaces.
  • ALTER PROCEDURE
  • CALL
  • CREATE PROCEDURE
  • DROP PROCEDURE
  • RENAME PROCEDURE
  • REPLACE PROCEDURE
  • HELP PROCEDURE
  • HELP 'SPL'
  • SHOW PROCEDURE
CREATE PROCEDURE and REPLACE PROCEDURE are supported from BTEQ, ODBC, JDBC, and CLIv2 applications.

From the BTEQ and TeqTalk utilities, you must submit CREATE/REPLACE PROCEDURE statements in the file referenced by the COMPILE command.

Using Stored Procedures with Unicode Pass Through

Unicode Pass Through (UPT) is a Unicode error handling feature. The feature gives users the ability to allow Pass Through Characters (PTCs) to be imported into and exported from Teradata.

In a session where UPT is disabled, you cannot create a stored procedure that references a PTC inside the stored procedure body. Such a procedure can only be created within a Pass Through session.

When calling a stored procedure that is defined with a PTC parameter or references a PTC in the stored procedure body, the following applies:
  • In a session where UPT is disabled, you cannot call a stored procedure that is defined with a PTC parameter.
  • In a Pass Through session, you can successfully call a stored procedure that is defined with a PTC parameter and pass a PTC literal to it as an argument.
  • In all sessions (UPT enabled or disabled), you can call a stored procedure that references a PTC in the body of the the stored procedure.
The following table summarizes the usage for stored procedures with PTCs.
Stored Procedure Creation or Execution Current Session Type Expected Result
Creating a stored procedure that references a PTC in the procedure body Pass Through session Successful
UPT is disabled Error
Calling a stored procedure that is defined with a PTC parameter Pass Through session Successful
UPT is disabled Error
Calling a stored procedure that references a PTC in the procedure body Pass Through session Successful
UPT is disabled Successful
Calling a stored procedure that is defined with a PTC parameter and also references a PTC in the procedure body Pass Through session Successful
UPT is disabled Error

For more information, see International Character Set Support, B035-1125.