Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
JavaScript compilation error: Uncaught SyntaxError: Invalid left-hand side expression in prefix operation in SP_PROCEDURE

I am writing Simple JavaScript Based Procedure in Snowflake and getting weird error

While calling this procedure i am getting following error,

JavaScript compilation error: Uncaught SyntaxError: Invalid left-hand side expression in prefix operation in SP_PROCEDURE at ' var ret=Delete();

CREATE OR REPLACE PROCEDURE "SP_PROCEDURE"()
RETURNS VARCHAR(16777216)
LANGUAGE JAVASCRIPT
STRICT
AS $$ 
        
         
         function Delete()         
           {        
                    var DeleteRepositoryTable=`DELETE FROM "TABLEA"`;
                    
                     try{
                                                        
                            
                     snowflake.execute({sqlText:DeleteRepositoryTable});

                       return "Success";
                     }
                     
                     catch(err)
                     {return "Error Ocurred While Loading Data" + err;  }
            }
            
            
            
            
        var ret=Delete();  ------------ 

        return ret;


        
        $$
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your procedure works fine for me:

CREATE OR REPLACE PROCEDURE "SP_PROCEDURE"()
RETURNS VARCHAR(16777216)
LANGUAGE JAVASCRIPT
STRICT
AS $$ 
         
         function Delete()         
           {        
                    var DeleteRepositoryTable=`DELETE FROM "CITIBIKE_TRIPS_TEMP"`;              
                     try{                                      
                         snowflake.execute({sqlText:DeleteRepositoryTable});
                         return "Success";
                     } catch(err) { 
                         return "Error Ocurred While Loading Data" + err;  
                     }
            }
        var ret=Delete();
        return ret;
        $$;

When I call it:

CALL "SP_PROCEDURE"();

I get back Success. How are you calling the procedure?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!