Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: help with query :)

RE: help with query :)

From: Abdul Aleem <abchaudhary-ho_at_beaconhouse.edu.pk>
Date: Wed, 31 May 2000 17:02:20 +0500
Message-Id: <10514.107253@fatcity.com>


I new to oracle, cannot write the exact code, but I feel you can = achieve it
in two steps.

1st step gets all required rows from the actual data source into a = cursor.
#of fetched rows is stored in a variable max_rows. 2nd step WHERE clause includes ROWCOUNT >=3D max_row - 10;

Note: To my understanding, ROWCOUNT is incremented as records are = fetched.
If this is the case, then this condition become false for the very = first
row, and you might not get any rows at all. But do give it a try and = let me
know. In the mean while, I will think of some other solutions.

Hope this would solve your problem

Aleem

		-----Original Message-----
		From:	Miguel Urosa [mailto:murosa_at_smseuropa.com]
		Sent:	31 May, 2000 3:26 PM
		To:	Multiple recipients of list ORACLE-L
		Subject:	RE: help with query :)

			I think, only you can take last 10 records in a
given table if there
		are still in V$SLQAREA view like insert sentence.

			HTH.


> -----Mensaje original-----
> De: Yohans Mendoza
[SMTP:yohans_at_demiurge.sirius-images.net]
> Enviado el: mi=E9rcoles 31 de mayo de 2000 2:25
> Para: Multiple recipients of list ORACLE-L
> Asunto: help with query :)
>=20
> hi all,
>=20
> 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?
Received on Wed May 31 2000 - 07:02:20 CDT

Original text of this message

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