View Single Post

  #4 (permalink)  
Old 05-06-2008
Peter H. Coffin
 
Posts: n/a
Default Re: How to find holes in a sequence?

On Mon, 5 May 2008 18:46:19 -0400, Steve Ackman wrote:
> In <9b3a64b4-aeab-43fb-bc07-ef960a2c34b0@y38g2000hsy.googlegroups.com>,
> on Mon, 5 May 2008 13:57:43 -0700 (PDT), cvh@LE,
> christian.hansel@cpi-service.com wrote:
>> On May 5, 9:00*pm, Steve Ackman <st...@SNIP-THIS.twoloonscoffee.com>
>> wrote:
>>> * I've got a leafnode directory with usenet articles
>>> named, roughly, 1-79389.
>>>
>>> After running a sh script on the directory to populate a
>>> table with various headers and the full article, I have,
>>>
>>> mysql> select count(*) from rcm;
>>> +----------+
>>> | count(*) |
>>> +----------+
>>> | * *79303 |
>>> +----------+
>>> 1 row in set (0.00 sec)
>>>
>>> and an actual article count on the directory of 79347.
>>>
>>> * Obviously, there are 44 articles that for some
>>> reason or other, failed the INSERT (and an additional
>>> 42 that don't exist as filenames). *Given that
>>> server_id (mediumint) is assigned the filename of the
>>> article, how can I find which numbers between 1 and
>>> 79389 *don't* exist as server_id?

>>
>> I'm a bit unsure whether I correctly understand what you try to
>> accomplish,
>> but given you have a table with all numbers 1..79389

>
> I'm not sure whether you think I have such a table,
> or whether you're suggesting I create one.


Create one.

ome web searching will turn up a variety of tricks for creating a table
filled with test data.

--
43. I will maintain a healthy amount of skepticism when I capture the beautiful
rebel and she claims she is attracted to my power and good looks and will
gladly betray her companions if I just let her in on my plans.
--Peter Anspach's list of things to do as an Evil Overlord
Reply With Quote