Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 36806476148 for ; Fri, 25 Oct 2002 00:34:34 -0400 (EDT) Received: from mail_exchange.westcountrypublications.co.uk (wcpmail.westcountrypublications.co.uk [195.171.163.153]) by postgresql.org (Postfix) with ESMTP id 27AB24760FA for ; Fri, 25 Oct 2002 00:34:33 -0400 (EDT) Received: by MAIL_EXCHANGE with Internet Mail Service (5.5.2650.21) id ; Thu, 24 Oct 2002 11:59:30 +0100 Message-ID: From: "Henshall, Stuart - Design & Print" To: 'andres javier garcia garcia' , PostgreSQL List Subject: Re: ORDER the result of a query by date Date: Thu, 24 Oct 2002 11:59:26 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C27B4C.6B4E26D0" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/346 X-Sequence-Number: 10063 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C27B4C.6B4E26D0 Content-Type: text/plain; charset="iso-8859-15" andres javier garcia garcia wrote: > Hello; > I've got the result of a query that appears as: > cod_variable | cod_station | year | month | day | rain > ---------------------+-------------------+--------+----------+ > ------+------ > 30201 | 7237 | 1953 | 1 | 1 | 2 > 30201 | 7237 | 1953 | 2 | 1 | 5 > 30201 | 7237 | 1953 | 3 | 1 | 0 > 30201 | 7237 | 1953 | 4 | 1 | -3 ..... > > (Of course, thanks to Stephan Szabo for the method to obtain this > from my strange source data. I didn't think this was possible.) > > After have done this query I've realized that I need the data to be > ordered by date. Do you have any suggestion? > > Best regards > ---------- > Javier > ORDER BY year,month,day should do it. hth, - Stuart ------_=_NextPart_001_01C27B4C.6B4E26D0 Content-Type: text/html; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable RE: [SQL] ORDER the result of a query by date

andres javier garcia garcia wrote:
> Hello;
> I've got the result of a query that appears as:
>  cod_variable | cod_station | year | month | d= ay | rain
> ---------------------+-------------------+--------+= ----------+
> ------+------
>  30201      &nbs= p;    | 7237        =    | 1953 |        1 | &n= bsp; 1 |    2
>  30201      &nbs= p;    | 7237        =    | 1953 |        2 | &n= bsp; 1 |    5
>  30201      &nbs= p;    | 7237        =    | 1953 |        3 | &n= bsp; 1 |    0
>  30201      &nbs= p;    | 7237        =    | 1953 |        4 | &n= bsp; 1 |   -3 .....
>
> (Of course, thanks to Stephan Szabo for the method = to obtain this
> from my strange source data. I didn't think this wa= s possible.)
>
> After have done this query I've realized that I nee= d the data to be
> ordered by date. Do you have any suggestion?
>
> Best regards
> ----------
> Javier
>
 ORDER BY year,month,day should do it.
hth,
- Stuart

------_=_NextPart_001_01C27B4C.6B4E26D0--