At 01:36 PM 5/3/2002, you wrote:
>Hello,
>
>Newbie SQL person here. I am hoping to be able to do the
>following. Given two dates, I would like to display all of the days
>between them.
>
>So if I had the dates 2002-02-08 and 2002-02-12, I would like to have
>MySQL spit back
>
>2002-02-08
>2002-02-09
>2002-02-10
>2002-02-11
>2002-02-12
>
>Any way I can do this directly in MySQL without constructing a table? I've
>looked through the date maniplulation routines in the manual, but nothing
>jumps out at me. Any pointers would be appreciated.
>
>I know how I could do this in Perl or PHP, but I was hoping to get it done
>directly in SQL.  Temp table?
>
>Thanks
>
>Tim

Tim,
          Here's a tip. You may want to  experiment on a temporary table 
first to see how the conversions end up looking. Just do a "create newtable 
select * from oldtable limit 10" and try your conversions on the newtable 
(indexes aren't created for newtable). If it works ok, let it rip on your 
oldtable. This way you protect your production table and you can experiment 
as much as you like with your temporary table.  If the temporary table 
didn't convert properly, just drop newtable and try again. :)  You can 
always use it to create a temporary backup of your entire production table 
before you convert. That way you have a backup in case something goes wrong.

Mike


---------------------------------------------------------------------
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

Reply via email to