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: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/04/02
Message-ID: <6fvbsf$c50$2@news01.btx.dtag.de>#1/1

Hi,

won't work since ID is an unique key, so that all rows would be selected.

On Thu, 02 Apr 1998 02:17:33 GMT, gennick_at_worldnet.att.net (Jonathan Gennick) wrote:

>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

--

Regards

Matthias Gresz    :-)

GreMa_at_T-online.de
Received on Thu Apr 02 1998 - 00:00:00 CST

Original text of this message

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