Originally posted by agonen
Hi , you can use Lag function to get all the rows with the gap between them is greater the one (assuming we have integers ) . and you can compute the different btween this pair of records do get the missing numbers).

This will won't do a cartizen join , and only one pass on the table.

2 points to remeber :

1. 9i and above only
2. Oracle will have to sort the data.

I will send a sample later.
I think that was addressed earlier in the thread