Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Joey Duhon — — source: Informix-list mailing list archive (1991-1998)
>> query an integer field for skips in a range? e.g. if I search a field of
>> integers ranging from 1 to 100 can I find the unused numbers?
you can find the gaps:
select a.intcol, max(b.intcol) gap
from table a, table b
where a.intcol between 1+1 and 100
and a.intcol > b.intcol
group by 1
having max(b.intcol) < (a.intcol-1)
you can check the lower end by simply finding the min(intcol)
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.