Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Number Sequence broken

Status
Not open for further replies.

stephenk1973

Technical User
Jun 11, 2003
246
GB
I have a table where a number field is automatically imported from data device, this incriments by +1 each time. If this device has a problem no data is sent causing a break in the series. Is there a 'query' way of spotting a break in the series?

Thanks

Stephen
 
not sure i understand completely

it's an autonumber, but the value is imported?

and when nothing is imported, it doesn't increment?

or, when nothing is imported, it automatically creates a gap?

yes, there are ways to find gaps in sequential numbers using a query (a pretty complex query, actually)

what do you want to do with the result of such a query?

hopefully, you aren't thinking of closing the gap...

rudy
SQL Consulting
 
The number is, i guess a type autonumber, but it is originated on the data device. These output is to a file which is imported into a database. If i can find those IDs which are missing i can force them back from the data devic and re-import them.

Problem is there are actually multiple datadevice all in diffrent locations. Since their results are imported to a central database overnight, i'd like to query the database to see when results have not posted over. Once way i figure in doing this is to see when there are gaps in the incramental transaction id sequences.

I have tried selecting the ID field, linking to the same table with an 'alias' and adding one to the ID field in the aliased table. I thought that where this relationshiop was not true is would indicate a gap. Am i off the map?

Thanks

Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top