Skip to content
Advertisement

Trying to create procedure in snowflake and getting error while passing value to another procedure

Below procedure to get the value from the metadata table and pass its value into another procedure.

Give the error message:

Execution error in store procedure GET_RESULTS: SQL compilation error: error line 1 at position 16 invalid indetifier ‘STBL1’ At Statement.execute, line 18 position 26

Advertisement

Answer

I am going to guess that both the values you are passing to the Stored Procedure sync_table are strings, and you sql command prc_stmt will look like:

but that is not valid SQL, it should be

which means you should add some quotes, given this is javascript the string can use double quotes and allow simple insertion of the needed single quotes:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement