I’m trying to load data into a table and data is coming from a sp which we are calling inside the main sp and loading data it into the table.
I have sql code which is working completely fine and i try to convert the below SQL script into snowflake but not snowflake code is not working as expected.
SQL Code :
Create Procedure Calcultaion1(param1 varchar(10))
AS
(
Declare Var1 Varchar(10);
Set Var1=param1;
If Var1 is null
THEN Var1 = getdate();
endif;
Insert into Calc_table1(Col1, col2, col3)
Exec Calcultaion_load(@var1); –This Calcultaion_load SP has a multiple joins and at the end returns a table
);
I try to convert the SQL script into snowflake but not snowflake code is not working as expected.
pratiksha gupta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.