Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/07/2008, 16:45
Avatar de xcars
xcars
 
Fecha de Ingreso: mayo-2005
Ubicación: El Salvador
Mensajes: 753
Antigüedad: 19 años, 1 mes
Puntos: 4
Respuesta: SELECT sin subconsultas

Cita:
Iniciado por flaviovich Ver Mensaje
Asi no te funciona?
Código:
SELECT C.Cuenta, C.Nombre, MAX(G.[Fecha Gestion]) [ULT_FCH_GEST],
    MAX(P.[Fecha Pago]) [ULT_FCH_PAGO], MAX(P.Valor) [VALOR_ULT_PAGO]
FROM CLIENTES C
    INNER JOIN GESTIONES G ON C.Cuenta=G.Cuenta
    INNER JOIN PAGOS P ON C.Cuenta=P.Cuenta
GROUP BY C.Cuenta, C.Nombre
hola, por otras cuestiones habia dejado esto a medias, pero andaba cerca, ahora pruebo tu codigo y voy a ver si lo hago funcionar.....
__________________
Con Microaplicaciones puedes hacer tu tienda en línea de forma sencilla y rápida, sin costos ocultos y con mucha responsabilidad.