| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Gerald L. Clark | Date: | October 8 2008 8:43pm |
| Subject: | Re: Finding gaps | ||
| View as plain text | |||
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`, 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 < `To` -- Gerald L. Clark Sr. V.P. Development Supplier Systems Corporation Unix since 1982 Linux since 1992
| Thread | ||
|---|---|---|
| • Finding gaps | Jerry Schwartz | 17 Sep |
| • Re: Finding gaps | Stut | 17 Sep |
| • Re: Finding gaps | Peter Brawley | 17 Sep |
| • RE: Finding gaps | Jerry Schwartz | 8 Oct |
| • Re: Finding gaps | Gerald L. Clark | 8 Oct |
| • RE: Finding gaps | US Data Export | 8 Oct |
| • Re: Finding gaps | Peter Brawley | 8 Oct |
| • RE: Finding gaps | US Data Export | 9 Oct |
| • Re: Finding gaps | Peter Brawley | 9 Oct |
| • RE: Finding gaps | Jerry Schwartz | 10 Oct |
| • Re: Finding gaps | Moon's Father | 25 Oct |
| • Re: Finding gaps | Moon's Father | 25 Oct |
| • RE: Finding gaps | US Data Export | 27 Oct |
| • RE: Finding gaps | Jerry Schwartz | 17 Sep |
| • Re: Finding gaps | Stut | 18 Sep |
| • Re: Finding gaps | Mr. Shawn H. Corey | 18 Sep |
| • RE: Finding gaps | Jerry Schwartz | 18 Sep |
| • Re: Finding gaps | Mike Diehl | 18 Sep |
| • RE: Finding gaps | Jerry Schwartz | 18 Sep |
| • RE: Finding gaps | Martin Gainty | 18 Sep |
| • RE: Finding gaps | Jerry Schwartz | 18 Sep |
| • Re: Finding gaps | Joerg Bruehe | 18 Sep |
| • Re: Finding gaps | Joerg Bruehe | 18 Sep |
| • Re: Finding gaps | Stut | 18 Sep |
| • Re: Finding gaps | Mr. Shawn H. Corey | 18 Sep |
