On Thursday 05 Jun 2003 3:56 pm, javier garcia - CEBAS wrote:
> But in this table there are some inexistents records (some missing days)
> And I would like to create lists with a full list of dates and
> corresponding precipitation data, with gaps when the row didn't exist.
> So; I've created a table with a complete series of dates from 1950 up to
> date, and made the query:
>
> SELECT fechas.fecha,precipitacion FROM fechas LEFT OUTER JOIN precal41 ON
> (fechas.fecha = precal41.fecha);
>
> This is perfect. But to make it better, would like to include just the
> dates from the first one in the precal table. So, I've tried:
>
> SELECT fechas.fecha,precipitacion FROM fechas LEFT OUTER JOIN precal41 ON
> (fechas.fecha = precal41.fecha) WHEN fechas.fecha >= min(precal41.fecha);
Perhaps something like (not tested):
SELECT .... WHERE fechas.fecha >= (SELECT min(precal41.fecha) FROM precal41);
--
Richard Huxton