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
Create
-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 for 4.1.22:
SELECT
a.id+1 AS 'Missing From',
MIN(b.id) - 1 AS 'To'
FROM tbl AS a, tbl AS b
: Wednesday, October 08, 2008 8:22 PM
To: US Data Export; mysql@lists.mysql.com
Subject: Re: Finding gaps
Jerry,
Here is a workaround for 4.1.22:
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 `Missing From` MIN
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,
Here
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 gaps
Is there any elegant way of finding the gaps?
You'll find some ideas under (and near) Find missing numbers
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`,
-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 this issue, and I've read the bits on
artfulsoftware
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/infotree/queries.php.
PB
-
Stut wrote:
On 17 Sep 2008, at 22:12, Jerry Schwartz wrote:
I
Well, 5.x accepted the query. It's been running for awhile, now, so I'll
find out later if it did what I need.
-Original Message-
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2008 5:25 PM
To: Jerry Schwartz; mysql@lists.mysql.com
Subject: Re: Finding gaps
I
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've read the bits on
artfulsoftware. The example
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
usually for
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
usually for
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
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
-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 will notice and will ask. Similar things have
Yes, that would have been a very good idea. I did not design this.
Even if we used auto-increment, my current problem would be the same:
finding gaps in the numbering.
Regards,
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
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:34, Jerry Schwartz wrote:
Our Japanese partners will notice and will ask
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 find single gaps. It won't find larger gaps.
Just my $.02.
Mike.
On Thursday 18
I have records that should be sequentially (not auto-increment) numbered,
but there are gaps. Is there any elegant way of finding the gaps?
Regards,
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX:
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.
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
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:
I have records that should be sequentially
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,
but there are gaps. Is there any elegant way
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 records that should
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
with
At 4:54 +0200 9/10/02, Jan Broermann wrote:
Hi,
I'm missing an answer to a topic which came up a couple of days /weeks ago.
For a database i'm administrating I would like to find out, which numbers
(of invoices)
are missing in our database. Is there a way to get this result set thru SQL?
Or do I
Permanent e-mail address : [EMAIL PROTECTED]
[EMAIL PROTECTED]
- Original Message -
From: Jan Broermann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 6:01 AM
Subject: Missing an answer to an topic (Finding gaps in db)
Hi
Hi,
I'm missing an answer to a topic which came up a couple of days /weeks ago.
For a database i'm administrating I would like to find out, which numbers
(of invoices)
are missing in our database. Is there a way to get this result set thru SQL?
Or do I have to do it with for example Java?
I think
Hi,
I'm missing an answer to a topic which came up a couple of days /weeks ago.
For a database i'm administrating I would like to find out, which numbers
(of invoices)
are missing in our database. Is there a way to get this result set thru SQL?
Or do I have to do it with for example Java?
I think
Hi,
I'm missing an answer to a topic which came up a couple of days /weeks ago.
For a database i'm administrating I would like to find out, which numbers
(of invoices)
are missing in our database. Is there a way to get this result set thru SQL?
Or do I have to do it with for example Java?
I think
Hi,
I have a table with this structure:
CREATE TABLE dats (
id INT UNSIGNED NOT NULL,
id_ref INT UNSIGNED NOT NULL,
start DATE NOT NULL,
endDATE NOT NULL
)
Now I am trying to create a query that will give me all intervals for which
the table does not
31 matches
Mail list logo