1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Snowflake error, Unsupported subquery type cannot be evaluated

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    I have a user defined function which returns number, argument is also a number. There is an aggregate function(sum()) inside the UDF. I am calling this UDF from a select clause. It's giving me the error "Unsupported subquery type cannot be evaluated".

    Basically i am rewriting the query used in SQL server DB. But it seems like snowflake doesn't support this case as it is. How can i rewrite it for snowflake? The queries loos like:

    Query:

    select salesNumber, date , totalValue(SalesId)
    from salesTable


    totalValue UDF body:

    select sum(amount)
    from SalesItems
    where SalesId=parameter_salesId

    Continue reading...

Compartilhe esta Página