MySQL Forums
Forum List  »  Stored Procedures

Re: selecting a date not in the range
Posted by: Peter Brawley
Date: January 29, 2012 01:49AM

Create a calendar table with a row for every relevant date ("Make a calendar table", http://www.artfulsoftware.com/queries.php), and exclusion join it to your data table ...

select ...
from calendar c
left join data d using(date)
where d.date is null;

Options: ReplyQuote


Subject
Views
Written By
Posted
1413
January 27, 2012 08:10AM
871
January 27, 2012 06:58PM
1044
January 27, 2012 09:24PM
795
January 28, 2012 06:36PM
Re: selecting a date not in the range
844
January 29, 2012 01:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.