Rules For Call Arguments In ODBC And JDBC - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantageā„¢
The following additional rules apply to a call argument when the CALL statement is submitted from an ODBC or JDBC application:
  • An IN or INOUT argument must be one of the following:
    • A value expression.

      A value expression must not contain identifiers prefixed by the COLON character. It must be a constant expression.

    • A QUESTION MARK (?) character used as an input placeholder.

      If you specify ?, the value for the corresponding IN or INOUT parameter of the called procedure must be set using ODBC- or JDBC-specific calls prior to calling the procedure.

      There is a 1:1 correspondence between the number of ? markers for IN and INOUT arguments and the number of data items specified in the StatementInfo parcel in the request message. StatementInfo does not contain entries for OUT arguments.

      For example, consider the following SQL procedure definition and CALL statement:

           CREATE PROCEDURE sp3 (
             IN pil     INTEGER,
             INOUT pio1 INTEGER,
             OUT po1    INTEGER)
           BEGIN
             SELECT j INTO :pio1
             FROM tb11
             WHERE i=2;
             SELECT k INTO :po1
             FROM tb11
             WHERE i=2;
           END;
      
           CALL sp3 (:?, :?, :?);

      When this call is made, the StatementInfo parcel contains 2 entries: one each for the IN and INOUT parameters.

  • An OUT argument must be an OUT call placeholder.