07# - APP de HOTEL com OUTSYSTEMS

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024
  • ✅ Meu Curso de Programação: dcoding.school
    Faça parte do nosso grupo no whatsapp sobre programação e outsystems
    chat.whatsapp....
    Deixem os LIKE para fortalecer
    Mandem duvidas e sugestões nos comentários.
    / doniscodes
    / donis-sousa

ความคิดเห็น • 3

  • @felipenogueira429
    @felipenogueira429 3 หลายเดือนก่อน +1

    Sql nao funcionou :(

    • @doniscodes
      @doniscodes  3 หลายเดือนก่อน

      vou mandar o meu aqui ve se ajuda, se não resolver manda o seu, por favor.

    • @doniscodes
      @doniscodes  3 หลายเดือนก่อน +1

      SELECT {Quarto}.* FROM {Quarto} WHERE @NumeroDeAdultos > 0 AND {Quarto}.[CapacidadeDeAdultos] >=@NumeroDeAdultos
      AND {Quarto}.[CapacidadeDeAdultos] + {Quarto}.[CapacidadeDeCriancas] >= @NumeroDeAdultos+@NumeroDeCriancas AND NOT EXISTS
      (SELECT 1 FROM {Reserva} WHERE {Reserva}.[QuartoId] = {Quarto}.[Id]
      AND (@CheckInData BETWEEN {Reserva}.[CheckInDate] AND {Reserva}.[CheckOutDate] - 1 OR
      @CheckInOut BETWEEN {Reserva}.[CheckInDate] + 1 AND {Reserva}.[CheckOutDate])
      AND {Reserva}.[StatusId] @CanceladoStatus)
      ORDER BY {Quarto}.[Preco] ASC