From: Peter Brawley Date: August 10 2006 11:15pm Subject: Re: How to create a table of dates? List-Archive: http://lists.mysql.com/mysql/200844 Message-Id: <44DBBDFA.1010805@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=======AVGMAIL-44DBBDFA71B0=======" --=======AVGMAIL-44DBBDFA71B0======= Content-Type: multipart/alternative; boundary=------------030504040807030107040906 --------------030504040807030107040906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit />So if the date range is '2001-01-15' to '2003-04-01' then it would generate >approx 800 rows with dates between these 2 ranges. I can't seem to figure >out how to do it without writing a program./ See Dates/'Make a calendar table at http://www.artfulsoftware.com/queries.php. PB ----- mos wrote: > This one has me puzzled. All I need to do is create a table of dates, > one date per row, from a starting to ending date. > > So if the date range is '2001-01-15' to '2003-04-01' then it would > generate approx 800 rows with dates between these 2 ranges. I can't > seem to figure out how to do it without writing a program. Is there a > way to generate these rows using just one sql statement? Or am I > relegated to writing a program to generate these dates? > > TIA > Mike > --------------030504040807030107040906 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit >So if the date range is '2001-01-15' to '2003-04-01' then it would generate
>approx 800 rows with dates between these 2 ranges. I can't seem to figure
>out how to do it without writing a program.


See Dates/'Make a calendar table at http://www.artfulsoftware.com/queries.php.

PB

-----

mos wrote:
This one has me puzzled. All I need to do is create a table of dates, one date per row, from a starting to ending date.

So if the date range is '2001-01-15' to '2003-04-01' then it would generate approx 800 rows with dates between these 2 ranges. I can't seem to figure out how to do it without writing a program. Is there a way to generate these rows using just one sql statement? Or am I relegated to writing a program to generate these dates?

TIA
Mike

--------------030504040807030107040906-- --=======AVGMAIL-44DBBDFA71B0======= Content-Type: text/plain; x-avg=cert; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Description: "AVG certification" No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.10.8/415 - Release Date: 8/9/2006 --=======AVGMAIL-44DBBDFA71B0=======--