Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > SQL
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #20  
Antiguo 29-11-2012
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.671
Poder: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Bien, pues le añades el tipo
Código SQL [-]
select h.nrohabitacion
from habitaciones h
where h.idtipo = :tipo
and h.habitacion not in (select r.idhabitacion
                         from clientereservahabitacion r
                         where r.fechasalida <= :desdefecha
                         or    r.fechaentrada >= :hastafecha)
and h.habitacion not in (select o.idhabitacion
                         from clienteocupahabitacion o
                         where o.fechasalida <= :desdefecha
                         or    o.fechaentrada >= :hastafecha)
order by h.nrohabitacion
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Consulta entre 2 fechas. DeLiRioS MySQL 14 29-04-2013 18:36:35
Consulta Mysql Suma entre rango de fechas kaeltas MySQL 4 22-06-2012 21:30:44
Consulta entre fechas con ADO radenf Varios 7 16-12-2010 12:06:35
Obtener consulta entre fechas maravert MySQL 1 16-11-2009 22:44:15
slq entre dos fechas comparar fechas taru MySQL 2 30-07-2007 16:10:36


La franja horaria es GMT +2. Ahora son las 03:30:41.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi