Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

188
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda