SSC-EWI-0025
Binding time variables might require a change in the query.
The EWI is only generated when Javascript is the target language for Stored Procedures. This is a deprecated translation feature, as Snowflake Scripting is the recommended target language for Stored Procedures.
Severity
Low
Description
The action of binding time variables might require changes in the query that contains them.
Example Code
Input Code:
-- Additional Params: -t javascript
CREATE PROCEDURE P_1025()
BEGIN
DECLARE LN_EMP_KEY_NO_PARAM NUMERIC DEFAULT -1;
DECLARE FLOATVARNAME FLOAT DEFAULT 12.1;
DECLARE hErrorMsg CHARACTER(30) DEFAULT 'NO ERROR';
DECLARE CurrTs TIME DEFAULT CURRENT_TIME;
DECLARE CurrTs2 TIME DEFAULT CURRENT_TIMESTAMP;
END;
Output Code:
CREATE OR REPLACE PROCEDURE P_1025 ()
RETURNS STRING
LANGUAGE JAVASCRIPT
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"teradata"}}'
EXECUTE AS CALLER
AS
$$
// SnowConvert Helpers Code section is omitted.
var LN_EMP_KEY_NO_PARAM = -1;
var FLOATVARNAME = 12.1;
var HERRORMSG = `NO ERROR`;
var CURRTS = new Date() /*** SSC-EWI-0025 - BINDING TIME VARIABLE MIGHT REQUIRE CHANGE IN QUERY. ***/;
var CURRTS2 = new Date();
$$;
Recommendations
No additional user actions are required.
If you need more support, you can email us at [email protected]
Last updated