Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL problem. return record id in a Group by select query?
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
![]() |
![]() |