Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009

    Unanswered: Populate Start_Date and End_Date

    I had the following fields, with a single record and I want to populate base on start and end date, length and repeat every:

    start_date = "08/03/09" (starts on)
    end_date = "08/21/09" (ends on)
    the_length = "1" (everyday)
    repeat_every = "2" (with an interval of 2 days)

    Now, I want to use SQL statement to populate the result "everyday" but with an interval of "2" days, starting from "start_date" up to "end_date".
    I was able to solve the problem on the application side (using Array and lots of IF statements), but I know this can be solved using a single Query/SQL Statement or a Stored Procedure.


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    could you please do a SHOW CREATE TABLE for your table

    it's sort of clear what you want to insert, but not really clear where you want to insert it | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts