I'm trying to create a Snowflake stored procedure, similar to the below code. But the Like Operator in the If-Else block is not working. Please look at the Bold code below. ***
Urgent help appreciated
----- STORED PROCEDURE ------
create or replace procedure test_stored_procedure(inputvalue varchar)
returns string not null
language javascript
as
$$
**if (inputvalue like '%abc%') { return 'valid input' } else { return 'invalid input'}**
$$
;
I am getting the below error while calling the procedure
JavaScript compilation error: Uncaught SyntaxError: Unexpected identifier in test_stored_procedure at ' if (inputvalue like '%abc%') { return 'valid input' } else { return 'invalid input'}' position 14
Aucun commentaire:
Enregistrer un commentaire