× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It seems to me if you generate a temporary table of all possible numbers
in the range (step 1 below), that simply exception joining to the table
in question would give the desired result. Selecting the minimum value
from the exception join would satisfy the "smallest missing number"
requirement.

Loyd Goodbar
Business Systems
BorgWarner Shared Services
662-473-5713
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S. Waterbury
Sent: Thursday, April 17, 2008 8:51 AM
To: Midrange Systems Technical Discussion
Subject: Re: Missing numbers ( was Re: )

Hello, David:

Try to use the "KISS" principle ("Keep It Super Simple!")

I think a simple solution could be:

1. create a table of available numbers
(a) use a batch program to initially load the "available numbers"
table,
with one sequential pass over the actual target table(s)

2. To allocate the next available number in your application(s):
(a) "pull" (SETLL, READ with record lock) the next available number
from "available" table
(b) immediately DELETE that number from "available" table (releases

record lock)
(c) use this number just obtained to insert into the actual target
table(s).

3. Periodically monitor how many numbers are available in each category,

e.g.:
SELECT COUNT(*) FROM availNbrs WHERE category = 'TX'
so you know when it is time to increase the size of those
numbers in the tables

Albert Einstein said, "Make it as simple as possible, but not simpler."

HTH,
Mark S. Waterbury

David FOXWELL wrote:
Thanks for all the replies and for giving my post a subject name.
...(snip)...




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.