SSC-EWI-RS0010

Out parameters not supported on top-level CALL unit.

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.

Severity

Low

Description

Redshift allows the use of CALL statements within out parameters as top-level code units without defining a variable that would be assigned as output. Snowflake enforces the usage of a variable to set the output value somewhere.

Code Example

Input Code:

IN -> Redshift_01.sql
CREATE OR REPLACE PROCEDURE get_total_sales_by_product(
    IN p_product_name VARCHAR(100),
    OUT p_total_sales DECIMAL(18, 2)
)
AS $$
BEGIN
    NULL;
END;
$$ LANGUAGE plpgsql;

CALL get_total_sales_by_product('Laptop');

Output Code:

Recommendations

  • Move the call into an anonymous block and declare a variable to pass as an output parameter.

  • If you need more support, you can email us at [email protected]

Last updated