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 problem. return record id in a Group by select query?

Re: SQL problem. return record id in a Group by select query?

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1998/04/02
Message-ID: <6fusfu$pm1@bgtnsc03.worldnet.att.net>#1/1

On Wed, 01 Apr 1998 18:18:07 -0700, "Kevin P. Fleming" <kfleming_at_access-laserpress.com> wrote:

>SELECT LineNo, Max(LineType), ID
>FROM Table
>GROUP BY LineNo;

You also need to group by ID:

        GROUP BY LineNo, ID;

As long as there is a one-to-one between ID an LineNo, you will be Ok.

Jonathan Received on Thu Apr 02 1998 - 00:00:00 CST

Original text of this message

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