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,
end DATE NOT NULL
)
Now I am trying to create a query that will give me all intervals for which
the table does not contain an entry grouped by id_ref, e.g. if the table
would contain
1, 1, '2000-01-01', '2000-31-12'
2, 1, '2001-02-01', '2002-31-12'
I would like to get
1, '2001-01-01', '2001-01-31', as there is a gap between these two entries.
Any idea on how to get this?
Jens
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php