Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> query with Min function

query with Min function

From: MARCOF <wwwmarco_at_yahoo.it>
Date: 11 Jul 2003 06:01:09 -0700
Message-ID: <84c9a426.0307110501.7d9fbb11@posting.google.com>


I HAve a table (datitemppirisposta) (ORACLE) it has 3 colums
DataInserimento, codicecontrollo, temporisposta

The first 2 colims are primary key.

I have to select "tempodirisposta" with the date nearest at other one taken as input

Es.
select
min(a.datainserimento), a.temporisposta from
datitempirisposta where
a.codicecontrollo = 'C0005098' and
a.datainserimento > to_Date('01/06/2003','dd/mm/yyyy') group by a.datainserimento, a.temporisposta order by a.datainserimento

In this way i have got many rows instead i need only one row . Received on Fri Jul 11 2003 - 08:01:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US