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

178
Views
how to use the variable in snowfalke procedure
  var step0=`select INGESTION_SUCCESSFUL,ingestion_uuid   from FILE_INGESTION_HISTORY where  ingestion_uuid=(
   select ingestion_uuid from registration where registry_subject_uuid=:1
   qualify row_number() over( order by dnb_latest_received_dt desc)=1)`;
   var statement0=snowflake.createStatement( {sqlText: step0,binds: [PARAM_REG_SUB_UUID]} );
   variable1= statement0.execute();
   variable1.next();
   ingsindc=variable1.getColumnValue(1);

ingsuuid=variable1.getColumnValue(2);

when i try to use above ingsuuid in sql where clause it is throwing error

var step1= create or replace temporary table FN_IGSN_REG_LBV1 as select * from registration where ingestion_uuid=**ingsuuid** and (DELETE_INDC=0) qualify row_number() over (partition by REGISTRATION_HASH_KEY order by dnb_latest_received_dt desc, row_created_tmst desc, registration_uuid desc) = 1;

  var statement1=snowflake.createStatement( {sqlText: step1} );
 statement1.execute();
  
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Binding a variable to a SQL statement allows you to use the value of the variable in the statement.

You can bind NULL values as well as non-NULL values.

The data type of the variable should be appropriate for the use of the value in the SQL statement. Currently, only JavaScript variables of type number, string, and SfDate can be bound. (For details about the mapping between SQL data types and JavaScript data types, see SQL and JavaScript Data Type Mapping.)

Here is a short example of binding:

var stmt = snowflake.createStatement(
   {
   sqlText: "INSERT INTO table2 (col1, col2) VALUES (?, ?);",
   binds:["LiteralValue1", variable2]
   }
);

More details: https://docs.snowflake.com/en/sql-reference/stored-procedures-usage.html#binding-variables

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!