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

[SQL] SQL Functions in databricks

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 9, 2024 às 11:12.

  1. Stack

    Stack Membro Participativo

    I want to create a function in SQL that returns yes if it's the first day of the month, else no. Below doesn't work.

    create temporary function newmonth()
    returns string(20)
    deterministic
    BEGIN
    IF day(date) <> '01' then
    return ('NO')
    else
    return ('YES')
    END IF;


    Can anyone help me out?

    Continue reading...

Compartilhe esta Página