This chapter is related to transforming the TYPE attribute when it references a column, variable, record, collection, or cursor. The transformation involves getting the referenced item data type and replacing the referencing item TYPE attribute for the data type obtained.
Sample Source Patterns
TYPE attribute for columns
In this case, the referenced item is a column from a table created previously.
Further information about FLOAT datatype can be found in FLOAT Data Type section
TYPE attribute for records
In this case, the referenced item is a record declared previously.
Oracle
IN -> Oracle_03.sql
CREATEORREPLACEPROCEDURE procedure1ISTYPE record_typ_def IS RECORD(field1 NUMBER);record_var record_typ_def;var1 record_var%TYPE;var2 record_var.field1%TYPE;BEGINNULL;END;
Snowflake
OUT -> Oracle_03.sql
CREATEORREPLACEPROCEDURE procedure1 ()RETURNSVARCHARLANGUAGESQLCOMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
EXECUTEASCALLERAS$$DECLARE!!!RESOLVE EWI!!! /*** SSC-EWI-0056 - CUSTOM TYPES ARE NOT SUPPORTED IN SNOWFLAKE BUT REFERENCES TO THIS CUSTOM TYPE WERE CHANGED TO OBJECT ***/!!!
TYPE record_typ_def IS RECORD(field1 NUMBER);record_var OBJECT !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - record_typ_def DATA TYPE CONVERTED TO OBJECT ***/!!! := OBJECT_CONSTRUCT();
var1 OBJECT := OBJECT_CONSTRUCT();var2 NUMBER(38, 18);BEGIN