From: Peter Brawley Date: March 26 2010 2:39pm Subject: Re: Populating dataset List-Archive: http://lists.mysql.com/mysql/221067 Message-Id: <4BACC72F.3040304@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------050106030808060304050108" --------------050106030808060304050108 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > how would I know to automatically insert a missing date A common problem. Build a calendar table (http://www.artfulsoftware.com/infotree/queries.php?#95) PB ----- Tompkins Neil wrote: > Hi, > > We have a table which contains the following sample of information > > 2010-03-20 > 2010-03-21 > 2010-03-22 > 2010-03-23 > 2010-03-26 > 2010-03-27 > 2010-03-28 > 2010-03-30 > > As you can see, the dates listed are not constant e.g missing 2010-03-29 as > a example. For our query like SELECT check_in_date FROM bookings how would > I know to automatically insert a missing date like 2010-03-29 between the > date range I search ? > > Thanks, > Neil > > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.437 / Virus Database: 271.1.1/2769 - Release Date: 03/25/10 07:33:00 > > --------------050106030808060304050108--