Work around to simulate the use of Records
This page is deprecated but was left for compatibility purposes. If you want to see the updated section, please refer to Collections And Records
Description
This section describes how to simulate the behavior of Oracle records in SELECT and INSERT Statements, using RESULTSET and CURSORS of Snowflake Scripting.
Snowflake Scripting RESULTSET and CURSOR
<resultset_name> RESULTSET [ DEFAULT ( <query> ) ] ;
LET <resultset_name> RESULTSET [ { DEFAULT | := } ( <query> ) ] ;
LET <resultset_name> RESULTSET [ { DEFAULT | := } ( <query> ) ] ;Recommendations
CREATE TABLE numbers_table(num integer, word varchar2(20));
INSERT INTO numbers_table VALUES (1, 'one');
CREATE TABLE aux_numbers_table(aux_num integer, aux_word varchar2(20));CREATE OR REPLACE TABLE PUBLIC.numbers_table (num integer,
word VARCHAR(20));
INSERT INTO PUBLIC.numbers_table VALUES (1, 'one');
CREATE OR REPLACE TABLE PUBLIC.aux_numbers_table (aux_num integer,
aux_word VARCHAR(20));Using RESULTSET and Cursors instead of Records
Oracle
Snowflake
Known Issues
1. Limitation in the use of RESULTSET
RESULTSET is very limited in its use. If table(result_scan(last_query_id())) statement, should be used just after the RESULTSET's query is executed. For further information check this link.
Related EWIs
No related EWIs.
Last updated
Was this helpful?