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: Thu, 17 Aug 2000 12:43:14 GMT
Message-ID: <8ngmku$kum$1@nnrp1.deja.com>

A datetime stamp is just as unreliable. The datetime stamp is updated when a row is updated. I would have to have a datetime stamp for a new record and then a datetime stamp for updates and then a datetimestamp for deletes, etc. to ad-nauseum. I understand and appreciate all of the feedback. These are paths that I have already been down and understand the pros and cons of all of them. I just wanted to be sure that I have gleaned the knowledge of the rest of you. There is always that wee small chance that I, being the greatest SQL programmer of all time, may have missed one small, seemingly insignificant detail. Wait a minute, what was I thinking!

Thanks to all.

In article <8ngke7$ic9$1_at_nnrp1.deja.com>,   mungoh_at_my-deja.com wrote:
> 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.
>

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

Original text of this message

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