Hi Nadya,
Instead of relying on SQL, here a faster method.
CREATE CURSOR Invert (un I)
SELECT t1
nLow = 0
INDEX ON Un TAG un
SCAN
FOR nT = nLow+1 TO Un-1
INSERT INTO Invert VALUES (nT)
ENDFOR
nLow=un
ENDSCAN
Walter,
>Hi everybody,
>
>Ok, I was inspired by Peter. Here is a very simple problem, but neverless, let's find out the most elegant solution.
>
>There is a table with some sequence unique numbers:
>
>1
>3
>4
>8
>15
>...
>
>No pattern. Your goal would be to find out all missing numbers (of course, only whole numbers).
>
>For more advanced, I would make the task more difficult: find out all missing simple (? oops, what's the correct math term?) numbers. The latest problem seems complicated and I don't know solution myself yet...