Re: How to obtain the maximum value of a date, between 3 tables...

From: Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>
To: Andre Lopes <lopes80andre(at)gmail(dot)com>
Cc: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to obtain the maximum value of a date, between 3 tables...
Date: 2010-12-09 03:03:18
Message-ID: 1291863798.2571.6.camel@asus-1001PX.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le jeudi 09 décembre 2010 à 03:58 +0100, Vincent Veyron a écrit :

>
> SELECT 'tbl1',last_refresh_date FROM tbl1 UNION SELECT 'tbl2',
> last_refresh_date FROM tbl2 UNION SELECT 'tbl3', last_refresh_date FROM
> tbl3 ORDER BY 1 DESC;
>

Argh... make that :

ORDER BY 2 DESC;

--
Vincent Veyron
http://marica.fr/
Progiciel de gestion des dossiers de contentieux et d'assurance pour le service juridique

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James B. Byrne 2010-12-09 03:14:03 Re: Set new owner on cloned database
Previous Message Vincent Veyron 2010-12-09 02:58:49 Re: How to obtain the maximum value of a date, between 3 tables...