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: Select statement question

Re: Select statement question

From: SteveC <carnwath_at_synygy.com>
Date: 20 Sep 2001 07:02:50 -0700
Message-ID: <cea788de.0109200602.4f66a9ad@posting.google.com>


SELECT Id, Site, max(Equipment) as Equipment FROM table1 group by Id, Site

tony1979_at_hotmail.com (Tony) wrote in message news:<d458d67.0109190036.141eccf4_at_posting.google.com>...
> > On 18 Sep 2001 02:48:49 -0700, tony1979_at_hotmail.com (Tony) wrote:
> >
> > >SELECT Id, Site, Equipment FROM table1 order by Id asc;
> > >
> > >Should only return row 1 and 3 ( or 2 and 3 ).
> > >
> > >Is this possible?
> >
> > yes. Try select distinct:
> > SELECT DISTINCT Id, Site, Equipment FROM table1 order by Id asc;
> >
> > Bye,
> > Ralf
>
> What if I need Id and Site to be unique, but not Equipment. Is this
> possible? ( The select statement must be pretty fast ).
>
> Kind regards,
>
> Tony Lee, UK
Received on Thu Sep 20 2001 - 09:02:50 CDT

Original text of this message

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