CALL

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Description

Runs a stored procedure. The CALL command must include the procedure name and the input argument values. You must call a stored procedure by using the CALL statement. (Redshift SQL Language Reference CALL).

Grammar Syntax

CALL sp_name ( [ argument ] [, ...] )

Sample Source Patterns

Base scenario

Input Code:

IN -> Redshift_01.sql
CREATE PROCEDURE sp_insert_values(IN arg1 INT, IN arg2 DATE)
LANGUAGE plpgsql
AS
$$
BEGIN
    INSERT INTO event VALUES (arg1, arg2);
END;
$$;

CALL sp_insert_values(1, CURRENT_DATE);

Output Code:

Call using Output Parameters Mode (INOUT, OUT)

Input Code:

Output Code:

Known Issues

  • Output parameters from calls outside procedures won't work.

  1. SSC-EWI-0073: Pending Functional Equivalence Review

Last updated