MSCEWI3124

Default Value Not Found For Parameter

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Medium

Description

This error will appear when a value is not added for a parameter that doesn't have a default value in a procedure call. NULL is added as the argument value just to match the parameter count.

Example Code

Input Code:

-- Given the following procedure
-- The parameter "param1" does not has any default value.
CREATE OR REPLACE PROCEDURE proc1(param1 NUMBER, param2 NUMBER default 100, param3 NUMBER) IS
BEGIN
INSERT INTO TABLE1(COL1) VALUES(param1);
END;
/

-- Calling the procedure without adding a value for "param1"
CREATE OR REPLACE PROCEDURE proc2 IS
BEGIN
proc1(param2 => 10, param3 => 20);
END;
/

Output Code:

-- Given the following procedure
-- The parameter "param1" does not has any default value.
CREATE OR REPLACE PROCEDURE PUBLIC.proc1 (param1 NUMBER(38, 18), param2 NUMBER(38, 18) /*** MSC-WARNING - MSCEWI1089 - The default value 100 is not supported by Snowflake. ***/, param3 NUMBER(38, 18))
RETURNS VARCHAR
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
BEGIN                                                                                INSERT INTO PUBLIC.TABLE1(COL1) VALUES(:param1);
END;
$$;

-- Calling the procedure without adding a value for param1
CREATE OR REPLACE PROCEDURE PUBLIC.proc2 ()
RETURNS VARCHAR
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
BEGIN
/*** MSC-WARNING - MSCEWI1079 - PARAMETER NAMES WERE REMOVED FROM CALL, CHECK PARAMETER ORDER ***/
CALL PUBLIC.proc1(null /*** MSC-ERROR - MSCEWI3124 - DEFAULT VALUE NOT FOUND FOR param1 PARAMETER ***/, 10, 20);
END;
$$;

Recommendations

  • Since this kind of procedure calls are not valid in Oracle, this error may be due to an input inconsistency. Check if you are referencing another procedure or if the argument for that parameter is missing.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated