Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Conexión con bases de datos
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Conexión con bases de datos

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 08-08-2007
Avatar de gluglu
[gluglu] gluglu is offline
Miembro Premium
 
Registrado: sep 2004
Ubicación: Málaga - España
Posts: 1.455
Poder: 23
gluglu Va por buen camino
Gracias a los dos por responder.

De momento me lo acepta así
Código SQL [-]
begin
  for Select BOJ.BOOKINGNO
  from BOOKINGS_OBJECTS BOJ
  left join BOOKINGS BO
    on BO.BOOKINGNO = BOJ.BOOKINGNO
  where
    BOJ.BUILDINGNO = :"BUILDING_NO" and
    BOJ.OBJECTNO = :"OBJECT_NO" and 
    BOJ.DATETO <= :"DATE_SP" and
    BO.STATUS = 3
    Into BOOK_NO
  do
    begin
      if (not :"BOOK_NO" is Null) then
        SUSPEND;
      else begin
        Select BOJ2.BOOKINGNO 
        from BOOKINGS_OBJECTS BOJ2
        left join BOOKINGS BO2
          on BO2.BOOKINGNO = BOJ2.BOOKINGNO
        where
          BOJ2.BUILDINGNO = :"BUILDING_NO" and
          BOJ2.OBJECTNO = :"OBJECT_NO" and
          BOJ2.DATEFROM >= :"DATE_SP" and
          BOJ2.DATETO <= :"DATE_SP" and
          BO2.STATUS <= 2
          Into BOOK_NO;
      end
    end
end

Ahora tengo que probar si me hace correctamente lo que quiero obtener
__________________
Piensa siempre en positivo !
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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
Stored Procedure,Triggers Io Firebird e Interbase 8 08-01-2007 16:17:55
Problema con stored procedure dape Firebird e Interbase 11 20-10-2005 05:13:23
Ver los Stored Procedure tgsistemas SQL 0 06-04-2004 17:18:22
Stored Procedure tgsistemas SQL 1 27-02-2004 13:10:33
problema con stored procedure Markoz Firebird e Interbase 8 27-06-2003 13:46:31


La franja horaria es GMT +2. Ahora son las 14:43:20.


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