Query to find a missing number





Hello,



I need to write a query to find out a set of missing number in a given
sequence.



Eg : a Column in some table has the following data



Col1

1

2

3

4

5

6

8

9

10



Here I need to write a query to find out that number 7 is missing in the
given sequence.

One possible solution is by using any loop. But I am looking out if the same
can be achieved using any query.



Thanks in advance.



Regards,

Mahesh











.



Relevant Pages

  • Re: Query to find amissing number
    ... Here I need to write a query to find out that number 7 is missing in the ... given sequence. ... giving you a quick way to determine if any gaps exist. ...
    (comp.databases.sybase)
  • Re: tempdb grows to 8G suddenly
    ... that a join predicate is missing. ... >> to someone running a query which has a join that has not been qualified ... a huge result set gets built up (in tempdb ...
    (microsoft.public.sqlserver.server)
  • RE: Find missing Working Days
    ... contains one field (intNumbers) and the values of 0 through 9. ... I then create a query that generates numbers from zero through ... Can anyone think of a query that can check if any days are missing? ... results into a table if a number from 1 to 5 is out of sequence but I wonder ...
    (microsoft.public.access.queries)
  • Re: RM formalism supporting partial information
    ... omniscient database. ... If the user formulates a query then this will now ... If the age or occupation is missing we could ... the value-does-not-apply interpretation can always also be ...
    (comp.databases.theory)
  • Re: Understanding How Access Sorts Records
    ... Best use a query to reorder ... incomplete records being entered and as it turns out, they are missing ... the value that I would be sorting on. ...
    (comp.databases.ms-access)