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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Missing Sequence number

Re: Missing Sequence number

From: MarkP28665 <markp28665_at_aol.com>
Date: 1998/03/02
Message-ID: <19980302224801.RAA13181@ladder02.news.aol.com>#1/1

From: Vinod K Srinivasan >>
Can someone tell me how to find the missing number in a column that has a sequence and fetch the row corresponding to that column. <<

I can see two separate answers to your question depending on which of the following is closest to the actual facts.

  1. If the row exits, but the column in question has no data then you should be able to check for the column being null like:

select rowid, some_cols_of_interest
from the_table
where the_col_in_question is null;

OR

2) The column in question is populated by a sequence generator and no row appears for a specific value, say 5, while rows 1 - 4 and 6 appear. This condition would exist if either of two events happened. The process that selected the sequence number was cancelled before it did the insert or rolled back instead of commited to the database or the row has already been deleted. In either of these two cases then this is the expected situation.

I hope this is helpful to your situation.

Mark Powell -- Oracle 7 Certified DBA
- The only advice that counts is the advice that you follow so follow your own advice - Received on Mon Mar 02 1998 - 00:00:00 CST

Original text of this message

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