How to find a gap in sequence of data field

  • Thread starter Thread starter CAD Fiend
  • Start date Start date
C

CAD Fiend

Hello,

I have a table named tblTownshipInfo.

The table has 4 fields:
TownshipID
RangeID
SectionID
TractID

The range of values are as such for each field:

Township = 7-8
Range = 5-7
Section = 1-150
Tract = 1-200

There are numerous gaps in the numbering sequence of the TractID field
that I'd like to identify so that I can tell the field people which
tracts they need to return to finish their site surveys. For example,
the TractID's are all contiguous until 35, then it skips to 39, then its
contiguous until 121, to which it jumps to 155 and so forth. There are
also gaps in the Section field, but the other two fields Township and
Range have no gaps, if this is relevant.

Can you write a query that will locate and then create a listing of all
records NOT found in the TractID field?

TIA.

Phil.
 
Phil,
i guess u can have a table with continuous sequence of your track record
(say your 1st track# is 1 and last is 100) then have a table with a field
start from 1 to 100. then use find unmatch query wizard (by clicking new
button in queries) to build a query with ur new table and tblTownshipInfo.
that should return all the unmatched (skipped) numbers.
 
Back
Top