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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL query

Re: SQL query

From: longinus <longinus_at_zeus.polsl.gliwice.pl>
Date: Tue, 20 Nov 2001 02:41:45 +0100
Message-ID: <3BF9B4D9.84E97027@zeus.polsl.gliwice.pl>


and if there are two records with the same value in end_date field? Then both of them are returned.

ST schrieb:
>
> select * from t_milestones a
> where a.status = 'not reached'
> a.end_date = (select min(end_date)
> from t_milestones)
>
> longinus <longinus_at_zeus.polsl.gliwice.pl> wrote in message
> news:3BF99E37.CD498962_at_zeus.polsl.gliwice.pl...
> > How to choose using SQL language the record that has status 'not
> > reached' and the minimal end_date?
> >
> > table description:
> >
> > SQL> desc t_milestones
> > Name Null? Type
> > ------------------------------- -------- ----
> > NAME VARCHAR2(50)
> > DEADLINE VARCHAR2(10)
> > END_DATE VARCHAR2(10)
> > STATUS VARCHAR2(15)
> > MILESTONESID NOT NULL NUMBER(5)
> > PROJ_ID NUMBER
Received on Mon Nov 19 2001 - 19:41:45 CST

Original text of this message

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