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: <mungoh_at_my-deja.com>
Date: Thu, 17 Aug 2000 12:05:40 GMT
Message-ID: <8ngke7$ic9$1@nnrp1.deja.com>

In article <399AC15E.2CB1926C_at_Unforgetable.com>,   Walter T Rejuney <BlueSax_at_Unforgetable.com> wrote:
> GF wrote:
> >

 I just always want the last record
> > that was added. There is no timestamp field.

Bluntly, although you may find a mechanism which appears to do what you want, it is (as others have said) unreliable. Donning my flame-proof suit, how's about saying "I have no money but I want to buy a car" instead of "there is no timestamp but I want the last record added".

>
> In a case like you describe probably the best way to provide that type
> of data is to have a non-wrapping sequence that has enough digits that
> it will never be exhausted

Bascially, a re-vamp of a timestamp which shows sequence. This will work, but I worry that using Oracle sequences you may care to consider the effect of CACHE on a sequence. You can (of course) turn such caching off, but at the end of the day extra effort to add such a new column might be better spent in adding a DATE column and be done with it.

Hope this is of use,

Mungo

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Aug 17 2000 - 07:05:40 CDT

Original text of this message

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