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

Home -> Community -> Usenet -> c.d.o.tools -> Re: interesting "group by" usage

Re: interesting "group by" usage

From: Chris Zoellick <azterix_at_@šNOSPAM+rochester.rr.com>
Date: Tue, 06 Mar 2001 01:23:02 GMT
Message-ID: <WZWo6.188510$v.17121412@typhoon.nyroc.rr.com>

You are not using any aggregate function (count, avg, max,...) therefore you cannot use a group by in your statement. If you want unique records, do this > select DISTINCT fname, lname from job_done. As to why it would work in any environment, I couldn't tell you

Chris

"Zhiliang Hu" <zhu_at_genomicfx.com> wrote in message news:3AA4276F.C9BB9ED9_at_genomicfx.com...
>
> I have a table that contains jobs done by different people
> at different times and I have a need to see a list of names
> with unique name entries. So I tried a
>
> > select fname, lname from job_done group by fname, lname;
>
> that works! ("not a group by expression" isn't it? ;-)
> -- indeed, when I tried the same thing through a web interface
> (via CGI <-> SQLPLUS) it complains "not a group by expression"
> Any thought why?
>
> Or is there an option that allows return of unique entries?
> (I didn't seem to find one).
>
> Zhiliang
>
>
Received on Mon Mar 05 2001 - 19:23:02 CST

Original text of this message

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