--Create TableCREATE TABLE jsdateudf_table( col1 DATE );--Create ProcedureCREATE OR REPLACE PROCEDURE jsdateudf_proc ( par1 DATE )ISBEGIN INSERT INTO jsdateudf_table VALUES(par1);END;--Insert DateCALL jsdateudf_proc('20-03-1996');--SelectSELECT * FROM jsdateudf_table;
--Create TableCREATE OR REPLACE TABLE jsdateudf_table ( col1 TIMESTAMP/*** SSC-FDM-OR0042 - DATE TYPE COLUMN HAS A DIFFERENT BEHAVIOR IN SNOWFLAKE. ***/)COMMENT ='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';--Create ProcedureCREATE OR REPLACE PROCEDURE jsdateudf_proc (par1 TIMESTAMP/*** SSC-FDM-OR0042 - DATE TYPE COLUMN HAS A DIFFERENT BEHAVIOR IN SNOWFLAKE. ***/)RETURNS VARCHARLANGUAGE SQLCOMMENT ='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'EXECUTE AS CALLERAS$$ BEGIN INSERT INTO jsdateudf_tableVALUES(:par1); END;$$;--Insert DateCALL jsdateudf_proc('20-03-1996');--SelectSELECT * FROM jsdateudf_table;
COL1 |
----------+
1996-03-20|
Known Issues
1. Oracle DATE contains TIMESTAMP
Take into consideration that Oracle DATE contains an empty TIMESTAMP (00:00:00.000), while Snowflake DATE does not. SnowConvert allows transforming DATE to TIMESTAMP with the SysdateAsCurrentTimestamp flag.
Related EWIs
SSC-FDM-OR0042: Date Type Transformed To Timestamp Has A Different Behavior