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

165
Views
SnowFlake stored procedure to delete a row from a table based on the date
create or replace procedure "ETL"."ACQ".SP_FILE_RETENT("Trgt_DB" VARCHAR, "Trgt_Schema" VARCHAR, "Trgt_Table" VARCHAR, "Trgt_Stage" VARCHAR)
returns string
language JavaScript
EXECUTE AS CALLER
as
$$

var remove_data_tbl = `delete from '`+Trgt_Table+`' where last_modified = current_date()`;
var remove_remove_data_tbl_sql = {sqlText: remove_data_tbl };
var remove_data_tbl_create = snowflake.createStatement(remove_remove_data_tbl_sql);
var remove_details_exec = remove_data_tbl_create.execute();

$$;

CALL "ETL"."ACQ".SP_FILE_RETENT('ETL', 'ACQ', 'METADATA', 'FILE_RETENTION');

when calling this procedure, it won't delete the rows from my table METADATA I have back ticks in place before 'delete' and before the + and I have other back ticks after the other plus and before the semi colon

about 4 years ago · Juan Pablo Isaza
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!