MSCCP0008
Nested function/procedure declarations are considered a complex pattern and not supported in snowflake.
Severity
Description
Code example
Input
CREATE OR REPLACE FUNCTION myFunction
RETURN INTEGER
IS
total_count INTEGER;
-- Function Declaration
FUNCTION function_declaration(param1 VARCHAR) RETURN INTEGER;
FUNCTION function_definition
RETURN INTEGER
IS
count INTEGER;
PROCEDURE procedure_declaration(param1 INTEGER)
IS
BEGIN
NULL;
END;
BEGIN
RETURN count;
end;
BEGIN
-- Your logic to calculate the total employee count goes here
RETURN total_count;
END;Output
Recommendations
Last updated
