1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[SQL] Hi, How to update negative values as Zero in Snowflake?

Discussão em 'Outras Linguagens' iniciado por Stack, Setembro 17, 2025.

  1. Stack

    Stack Membro Participativo

    CASE
    WHEN round(months_between(CURRENT_DATE, nvl(bpi.StartDate, cli.StartDate))) > round(months_between(nvl(bpi.EndDate, cli.EndDate), nvl(bpi.StartDate, cli.StartDate)))
    THEN round(months_between(nvl(bpi.EndDate, cli.EndDate), nvl(bpi.StartDate, cli.StartDate)))
    ELSE round(months_between(CURRENT_DATE, nvl(bpi.StartDate, cli.StartDate)), 1)
    END AS Months_Used

    Continue reading...

Compartilhe esta Página