CREATEORREPLACEPROCEDURE GetVacationHours ( PARAM1 FLOAT /*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'READONLY PARAMETERS' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/,
PARAM2 FLOAT /*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'VARYING PARAMETERS' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/,
PARAM3 FLOAT /*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'OUTPUT PARAMETERS' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
)RETURNSVARCHARLANGUAGESQLEXECUTEAS CALLEAS$$BEGIN-- Procedure BodyEND;$$;
2. Create Procedure Optional Arguments
In Transact-SQL exists several Create Procedure options that are not supported by Snowflake Scripting such as WITH ENCRYPTION, WITH RECOMPILE or FOR REPLICATION.
CREATEORREPLACEPROCEDURE GetVacationHours ()RETURNSVARCHARLANGUAGESQLEXECUTEASCALLER/*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'ENCRYPION OPTION' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
/*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'RECOMPILE OPTION' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
/*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'EXECUTE AS USER_NAME' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
/*** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'FOR REPLICATION' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING ***/
AS$$BEGIN-- Procedure BodyEND;$$;
3. SET Property and Mutator
Input Code:
CREATEORALTERPROCEDURE customDataASSET @p.X = @p.X +1.1; SET @p.SetXY(22, 23);RETURNPoint;GO
Output Code:
CREATEORREPLACEPROCEDURE customData ()RETURNSVARCHARLANGUAGESQLEXECUTEASCALLERAS$$BEGIN-- ** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'SET PROPERTY AND SET MUTATOR' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING **
-- SET @p.X = @p.X + 1.1;-- ** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'SET PROPERTY AND SET MUTATOR' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING **
-- SET @p.SetXYEND;$$;
4. Deallocate
The cursor deallocate is not supported by Snowflake Scripting.
CREATEORREPLACEPROCEDURE PUBLIC.CursorExample ()RETURNSVARCHARLANGUAGESQLEXECUTEASCALLERAS$$BEGIN-- ** MSC-ERROR - MSCEWI1037 - TRANSLATION FOR STATEMENTS IS PLANNED TO BE DELIVERED IN THE FUTURE **-- DECLARE-- @CursorVar CURSOR;-- ** MSC-ERROR - MSCEWI1058 - FUNCTIONALITY FOR 'DEALLOCATE' IS NOT CURRENTLY SUPPORTED BY SNOWFLAKE SCRIPTING **-- DEALLOCATE @CursorVar ;END;$$;-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **--GO