Gap in Sequence

G

Guest

Hello,

I found the following searching for a query to find gap in a sequence of
numbers

This will find the first number of every gap in the sequence:

SELECT T.num + 1
FROM table As T LEFT JOIN table As X
ON T.num+1 = X.Num
WHERE X.num Is Null

It was originally written by Marsh MVP [MS Access]

When i try to execute it (Access 2000) I keep getting an 'Join Expression
Not Supported'. I've verified the synthax. What is wrong?

Thank you.

Daniel
 
J

Jamie Collins

This will find the first number of every gap in the sequence:

SELECT T.num + 1
FROM table As T LEFT JOIN table As X
ON T.num+1 = X.Num
WHERE X.num Is Null

It was originally written by Marsh MVP [MS Access]

When i try to execute it (Access 2000) I keep getting an 'Join Expression
Not Supported'.

The keyword 'table' is a reserved word in... well, just about anything
relating to SQL. Substitute the real name of your table (if your
really do have a table named 'table' then rename it!)

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top