Join us for our FREE Dev Day event in San Francisco on June 5!

Twin Cities

To get a simple procedure involving MERGE statement to work.

I am able to test this code individually in worksheet and I am able to compile the procedure also, but Im not able to run it without errors. Its failing at the statement where it gets the RESULT_SCAN values to variables.

CREATE OR REPLACE PROCEDURE merge_source_to_target()

RETURNS VARCHAR

LANGUAGE SQL

EXECUTE AS CALLER -- Enables access to session variables

AS

$$

DECLARE

v_merge_query_id VARCHAR;

see more
View thread 0 comments
I just want to create a simple stored procedure with a MERGE statement with callers rights. I am not able to compile the below proc. The error I get is always with the variables datatype. Can someone help me to see what is going on?

Below is the code. The error I get is : syntax error line 4 at position 18 unexpected 'NUMBER'. syntax error line 8 at position 18 unexpected '='. I tried to resolve this using chatGPT but they go in circles by asking me to use INTEGER and then NUMBER :)

CREATE OR REPLACE PROCEDURE merge_source_to_target()

RETURNS VARCHAR

LANGUAGE SQL

EXECUTE AS CALLER -- Enables access to session variables

AS

$$

DECLA…

see more
View thread 0 comments
Snowflake Certification and Training Recommendations

Good morning,

I am a Quality Engineer and Snowflake is a new data cloud solution at my company. I have experience with Data Warehouses and SQL and taught myself Snowflake for my initial use and testing. That said, I am hoping to further my training and certification. I am looking to clarify if the SnowPro Core Certification is recommended. I do see instructor led coursework available and would…

see more
View thread 0 comments