Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: help with query :)
Jared,
Within Oracle certainly true or the front end app could do something similar with it's own sequence.
Hmmm, (thinks) you could try something truly creative | horrible like, within the trigger insert the key into an empty table ~ pctfree 0, pctused 99.
That way you could possibly use the last 10 ROWID's to get the keys, to get the records as the inserted rows should go up in ROWID order.
I don't fancy proving it though.
George
> -----Original Message-----
> From: "Jared Still" <jkstill_at_bcbso.com> [mailto:jkstill_at_bcbso.com]
> Sent: Thursday, June 01, 2000 6:49 PM
> To: smtp_at_inl001@servers["Multiple recipients of list ORACLE-L"
> <ORACLE-L_at_fatcity.com>]
> Subject: RE: help with query :)
>
>
>
> George, that is certainly true.
>
> A number(12,0) column populated with trigger and a sequence
> is the only way I can think of to retrieve the most recently
> inserted rows from a table.
>
> Jared
>
> On Thu, 1 Jun 2000 George.Brennan_at_warnermusic.com wrote:
>
> > Possibly, but Oracle is quite capable of inserting more
> than 10 records with the same timestamp in a multiuser application.
> >
> > George.
> >
> > > -----Original Message-----
> > > From: "Yohans Mendoza" <yohans_at_demiurge.sirius-images.net>
> > > [mailto:yohans_at_demiurge.sirius-images.net]
> > > Sent: Wednesday, May 31, 2000 6:32 PM
> > > To: smtp_at_inl001@servers["Multiple recipients of list ORACLE-L"
> > > <ORACLE-L_at_fatcity.com>]
> > > Subject: RE: help with query :)
> > >
> > >
> > > what about ordering the records by the time stamp ( na column
> > > I have for
> > > the record creation) and use the ROWCOUNT < 10?
> > > will it work?
> > >
> > > Thank you all for your responses!
> > > --Yohans
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > ~~~~~~~~~~~~~~~~~
> > > Yohans Mendoza System Analyst
> > > yohans_at_sirius-images.com Sirius Images Inc.
> > > http://www.sirius-images.net/users/yohans
> > > http://www.sirius-images.com
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > ~~~~~~~~~~~~~~~~~
> > >
> > > On Wed, 31 May 2000 George.Brennan_at_warnermusic.com wrote:
> > >
> > > > That will only retrieve the first 10 rows not the last 10
> > > entered. That needs an identifying column, such as a sequence
> > > based trigger or auditing.
> > > >
> > > > George,
> > > >
> > > > > -----Original Message-----
> > > > > From: "Abdul Aleem" <abchaudhary-ho_at_beaconhouse.edu.pk>
> > > > > [mailto:abchaudhary-ho_at_beaconhouse.edu.pk]
> > > > > Sent: Wednesday, May 31, 2000 8:59 AM
> > > > > To: smtp_at_inl001@servers["Multiple recipients of list ORACLE-L"
> > > > > <ORACLE-L_at_fatcity.com>]
> > > > > Subject: RE: help with query :)
> > > > >
> > > > >
> > > > > In your WHERE clause try adding ROWCOUNT < 10;
> > > > >
> > > > > Regards,
> > > > >
> > > > > Aleem
> > > > >
> > > > > -----Original Message-----
> > > > > From: Yohans Mendoza
> > > > > [mailto:yohans_at_demiurge.sirius-images.net]
> > > > > <mailto:[mailto:yohans_at_demiurge.sirius-images.net]>
> > > > > Sent: 31 May, 2000 5:25 AM
> > > > > To: Multiple recipients of list ORACLE-L
> > > > > Subject: help with query :)
> > > > >
> > > > > hi all,
> > > > >
> > > > > hope you're ok
> > > > > I have this "silly" question. Is there
> an easy way to
> > > > > retrieve the last 10
> > > > > records that have been entered in a given table?
> > > > >
> > > > > TIA
> > > > >
> > > > > --Yohans
> > > > >
> > > > > --
> > > > > Author: Abdul Aleem
> > > > > INET: abchaudhary-ho_at_beaconhouse.edu.pk
> > > > >
> > > > > Fat City Network Services -- (858) 538-5051 FAX:
> > > (858) 538-5051
> > > > > San Diego, California -- Public Internet access /
> > > Mailing Lists
> > > > >
> > >
> --------------------------------------------------------------------
> > > > > To REMOVE yourself from this mailing list, send an
> E-Mail message
> > > > > to: ListGuru_at_fatcity.com (note EXACT spelling of
> > > 'ListGuru') and in
> > > > > the message BODY, include a line containing: UNSUB ORACLE-L
> > > > > (or the name of mailing list you want to be removed
> > > from). You may
> > > > > also send the HELP command for other information (like
> > > subscribing).
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Author:
> > > > INET: George.Brennan_at_warnermusic.com
> > > >
> > > > Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> > > > San Diego, California -- Public Internet access /
> > > Mailing Lists
> > > >
> --------------------------------------------------------------------
> > > > To REMOVE yourself from this mailing list, send an
> E-Mail message
> > > > to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> > > > the message BODY, include a line containing: UNSUB ORACLE-L
> > > > (or the name of mailing list you want to be removed
> from). You may
> > > > also send the HELP command for other information (like
> subscribing).
> > > >
> > >
> > > --
> > > Author: Yohans Mendoza
> > > INET: yohans_at_demiurge.sirius-images.net
> > >
> > > Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> > > San Diego, California -- Public Internet access /
> Mailing Lists
> > >
> --------------------------------------------------------------------
> > > To REMOVE yourself from this mailing list, send an E-Mail message
> > > to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> > > the message BODY, include a line containing: UNSUB ORACLE-L
> > > (or the name of mailing list you want to be removed
> from). You may
> > > also send the HELP command for other information (like
> subscribing).
> > >
> > >
> >
> >
> > --
> > Author:
> > INET: George.Brennan_at_warnermusic.com
> >
> > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> > San Diego, California -- Public Internet access /
> Mailing Lists
> > --------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> >
>
>
> Jared Still
> Certified Oracle DBA and Part Time Perl Evangelist ;-)
> Regence BlueCross BlueShield of Oregon
> jkstill_at_bcbso.com - Work - preferred address
> jkstill_at_teleport.com - private
>
>
> --
> Author: Jared Still
> INET: jkstill_at_bcbso.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
Received on Fri Jun 02 2000 - 11:07:14 CDT