Re: Find Missing Numbers in a Sequence
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Thu, 20 Dec 2007 08:54:34 +0900
The missing numbers have to come from somewhere, to create a table that has the entire sequence of numbers you could need, from lowest to highest. You can use the code at the end of this page to populate it if you wish:
http://allenbrowne.com/ser-39.html
(The example populates from 1 to 1000, but you can change the loop easily enough.)
Now use the Unmatched Query Wizard to get all the numbers in this counter table that are not in your actual table.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Gary Dolliver" <GaryDolliver@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BCA23BD4-4D7D-4932-AB35-9BAAB417111D@xxxxxxxxxxxxxxxx
Hi everyone,
I have a table that is imported to daily, and sometimes orders are not
correctly migrated into the system. As all numbers that come in are in
numerical order, is there a way to create a query that will return a result
set of numbers from the sequence that are missing, based on the highest and
lowest value of the number sequence?
Help is always appreciated, thanks!
-gary
.
- Prev by Date: Follow up to earlier Select Query Question
- Next by Date: Re: How to set up relationship query for minerals database - continued
- Previous by thread: Follow up to earlier Select Query Question
- Next by thread: Re: Find Missing Numbers in a Sequence
- Index(es):
Relevant Pages
|