Number Sequence Query - Mailing list pgsql-novice

From John Nix
Subject Number Sequence Query
Date
Msg-id Pine.LNX.4.44.0210091609010.9811-100000@server.sblug.org
Whole thread Raw
Responses Re: Number Sequence Query
List pgsql-novice
I have a field with case numbers in it that I need to find out what
numbers are left out in the sequence.  The numbers can be formatted fairly
strangely, so let me give you an example:

 case_num
----------
 020018
 020020
 020021
 02002201
 020024

I'm only really looking at the numbers that start with 02 and the number
sequence is the 4 numbers right after the 02.  As you can see by my
example, 020023 is missing.  I would like to be able to run a query to
see all the missing numbers in sequence.  I'm not even sure where to start
looking for information.  I did searches from Google and in the groups
(which normally answers my questions), but I can't find anything.  Can
someone help me with this?  Thanks...

John


pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Setting up PAM authentication
Next
From: "Devinder K Rajput"
Date:
Subject: Re: Number Sequence Query