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: Retrieving first occurrence - How?

Re: Retrieving first occurrence - How?

From: GF <GAYLEN.FRALEY_at_MAIL.SPRINT.COM>
Date: Wed, 16 Aug 2000 16:29:26 GMT
Message-ID: <8nefg9$3j7$1@nnrp1.deja.com>

Thanks! That looks promising. It works in all of the tests I've run. Can anyone verify that max(rowid) will always return the last record entered for multiple entries in a table?

In article <966436810.9910.0.nnrp-13.9e9809ca_at_news.demon.co.uk>,   "Richard Armstrong" <richard.armstrong_at_juno.demon.co.uk> wrote:
> Could you use the rowid? This could allow you to select a single
 record but
> I'm not certain whether max(rowid) would always necessarily
 correspond to
> the most recently added record.
>
> Regards,
>
> Richard
>
> GF <GAYLEN.FRALEY_at_MAIL.SPRINT.COM> wrote in message
> news:8ne5b4$mim$1_at_nnrp1.deja.com...
> > Assume that table A has multiple records for a given id. Is there a
> > way to select only one (or the first) occurrence of each id?
 There is
> > no other field to group by/having. I just always want the last
 record
> > that was added. There is no timestamp field.
> >
> > Thanks!
> >
> > gaylen.fraley_at_mail.sprint.com
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Aug 16 2000 - 11:29:26 CDT

Original text of this message

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