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.
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