Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/05/2010, 19:36
lestatAb
 
Fecha de Ingreso: febrero-2010
Mensajes: 37
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: operaciones sobre union...

Q´ tal , solo qiero decir q funcionó de esta manera:
Código:
select min(inicio) from (
SELECT     MIN(FechaIniCon) AS inicio
FROM         t1
WHERE     (Cedula = @cedula) AND (FechaIniCon IS NOT NULL)
UNION
(SELECT     MIN(FechaIniAcu) AS Expr1
 FROM         t2
 WHERE     (Cedula = @cedula) AND (FechaIniAcu IS NOT NULL)
UNION
SELECT     MIN(FechaInicio) AS Expr1
FROM         t3
WHERE     (Cedula = @cedula) AND (FechaInicio IS NOT NULL))) as t1