RE: Finding gaps

2008-10-27 Thread US Data Export
Thanks for the suggestion. Unfortunately that doesn't fit my need, because I need to go back in time. From: Moon's Father [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2008 2:57 AM To: Jerry Schwartz Cc: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: Finding gaps

Re: Finding gaps

2008-10-25 Thread Moon's Father
never really gotten >> the hang of self-joins. >> >> >> >> From: Peter Brawley [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, October 08, 2008 8:22 PM >> To: US Data Export; mysql@lists.mysql.com >> Subject: Re: Finding gaps >> >> >>

Re: Finding gaps

2008-10-24 Thread Moon's Father
ver really gotten > the hang of self-joins. > > > > From: Peter Brawley [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 08, 2008 8:22 PM > To: US Data Export; mysql@lists.mysql.com > Subject: Re: Finding gaps > > > > Jerry, > > Here is a workaround fo

RE: Finding gaps

2008-10-10 Thread Jerry Schwartz
Thanks. Although I've been around SQL for quite a while, I've never really gotten the hang of self-joins. From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2008 8:22 PM To: US Data Export; mysql@lists.mysql.com Subject: Re: Finding gaps Jerry,

Re: Finding gaps

2008-10-08 Thread Peter Brawley
dnesday, October 08, 2008 5:25 PM To: Jerry Schwartz; mysql@lists.mysql.com Subject: Re: Finding gaps I must be missing something obvious; or does this not work in 4.1.22? Looks like a 4.1.22 bug. PB Jerry Schwartz wrote: I'm finally getting back to this issue, and I'v

RE: Finding gaps

2008-10-08 Thread US Data Export
egards, >> >> Jerry Schwartz >> The Infoshop by Global Information Incorporated >> 195 Farmington Ave. >> Farmington, CT 06032 >> >> 860.674.8796 / FAX: 860.674.8341 >> >> www.the-infoshop.com >> www.giiexpress.com >> www.et

Re: Finding gaps

2008-10-08 Thread Peter Brawley
to:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2008 5:26 PM To: Stut; mysql@lists.mysql.com Subject: Re: Finding gaps Is there any elegant way of finding the gaps? You'll find some ideas under (and near) "Find missing numbers in a sequence" at http://www.artfulsoftware.com/inf

RE: Finding gaps

2008-10-08 Thread US Data Export
>-Original Message- >From: Gerald L. Clark [mailto:[EMAIL PROTECTED] >Sent: Wednesday, October 08, 2008 4:44 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Finding gaps > >Jerry Schwartz wrote: >> I'm finally getting back to th

Re: Finding gaps

2008-10-08 Thread Gerald L. Clark
Jerry Schwartz wrote: I'm finally getting back to this issue, and I've read the bits on artfulsoftware. The example SELECT a.id+1 AS 'Missing From', MIN(b.id) - 1 AS 'To' FROM tbl AS a, tbl AS b WHERE a.id < b.id GROUP BY a.id HAVING a.id < MIN(b.id) - 1; SELECT a.id+1 AS `Missing_From`

RE: Finding gaps

2008-10-08 Thread Jerry Schwartz
032   860.674.8796 / FAX: 860.674.8341   www.the-infoshop.com www.giiexpress.com www.etudes-marche.com >-Original Message- >From: Peter Brawley [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 17, 2008 5:26 PM >To: Stut; mysql@lists.mysql.com >Subject: Re: Finding ga

RE: Finding gaps

2008-09-18 Thread Jerry Schwartz
m >Cc: Jerry Schwartz; 'Stut' >Subject: Re: Finding gaps > >Hi all, > >I'm just throwing something out ... > >How about: > >select a.id,b.id from dataset a left join dataset b > on a.id=b.id+1 > where b.id is null; > >This should f

Re: Finding gaps

2008-09-18 Thread Mike Diehl
7 am Jerry Schwartz wrote: > >-Original Message- > >From: Stut [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, September 17, 2008 6:30 PM > >To: Jerry Schwartz > >Cc: mysql@lists.mysql.com > >Subject: Re: Finding gaps > > > >On 17 Sep 2008, at 22

RE: Finding gaps

2008-09-18 Thread Jerry Schwartz
860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2008 6:29 PM To: Stut; Jerry Schwartz Cc: mysql@lists.mysql.com Subject: RE: Finding gaps unless you cant spare

RE: Finding gaps

2008-09-18 Thread Jerry Schwartz
>-Original Message- >From: Stut [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 17, 2008 6:30 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Finding gaps > >On 17 Sep 2008, at 22:34, Jerry Schwartz wrote: >> Our Japanese partners wil

Re: Finding gaps

2008-09-18 Thread Mr. Shawn H. Corey
On Thu, 2008-09-18 at 09:58 +0100, Stut wrote: > Autonumber will accomplish that, so long as you don't delete any. > And > if you do, renumbering the bookings would cause more problems than > it > solved. > Autonumber has the possibility of gaps. When a record is insert, the counter is incre

Re: Finding gaps

2008-09-18 Thread Stut
On 18 Sep 2008, at 07:45, Joerg Bruehe wrote: Stut schrieb: On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: I have records that should be sequentially (not auto-increment) numbered, but there are gaps. Is there any elegant way of finding the gaps? Why do they need to be sequential? When thi

Re: Finding gaps

2008-09-18 Thread Joerg Bruehe
Hi ! Stut schrieb: > On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: >> I have records that should be sequentially (not auto-increment) numbered, >> but there are gaps. Is there any elegant way of finding the gaps? > > Why do they need to be sequential? When this requirement comes up it's > usual

Re: Finding gaps

2008-09-18 Thread Joerg Bruehe
HI ! Stut schrieb: > On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: >> I have records that should be sequentially (not auto-increment) numbered, >> but there are gaps. Is there any elegant way of finding the gaps? > > Why do they need to be sequential? When this requirement comes up it's > usual

Re: Finding gaps

2008-09-17 Thread Mr. Shawn H. Corey
On Wed, 2008-09-17 at 23:29 +0100, Stut wrote: > On 17 Sep 2008, at 22:34, Jerry Schwartz wrote: > > Our Japanese partners will notice and will ask. Similar things have > > come up > > before. > > > > I want to be pro-active. > > Notice what? Why would it be bad? What type of data are we dealing

Re: Finding gaps

2008-09-17 Thread Stut
mbers to be in the database. -Stut -- http://stut.net/ -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2008 5:17 PM To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: Finding gaps On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: I have re

RE: Finding gaps

2008-09-17 Thread Martin Gainty
sql@lists.mysql.com > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: Finding gaps > Date: Wed, 17 Sep 2008 22:16:52 +0100 > > On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: > > I have records that should be sequentially (not auto-increment) > > numbered, >

RE: Finding gaps

2008-09-17 Thread Jerry Schwartz
www.giiexpress.com www.etudes-marche.com >-Original Message- >From: Stut [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 17, 2008 5:17 PM >To: Jerry Schwartz >Cc: mysql@lists.mysql.com >Subject: Re: Finding gaps > >On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: >>

Re: Finding gaps

2008-09-17 Thread Peter Brawley
>Is there any elegant way of finding the gaps? You'll find some ideas under (and near) "Find missing numbers in a sequence" at http://www.artfulsoftware.com/infotree/queries.php. PB - Stut wrote: On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: I have records that should be sequentially

Re: Finding gaps

2008-09-17 Thread Stut
On 17 Sep 2008, at 22:12, Jerry Schwartz wrote: I have records that should be sequentially (not auto-increment) numbered, but there are gaps. Is there any elegant way of finding the gaps? Why do they need to be sequential? When this requirement comes up it's usually for illogical reasons.