RRinTetons
IS-IT--Management
When I set up an application for a new season I need to create multiple rows for a range of dates. Given a start date and an end date, what is an elegant way to create a row in a table for each date (inclusive), without a looping or recursive construct?
ScheduleDate
------------
ID_Date INT (PK, Identity}
ScheduleDate DATE
Comment NVARCHAR(255)
For 11/1/2011 through 4/15/2012, insert one row for each date.
-
Richard Ray
Jackson Hole Mountain Resort
ScheduleDate
------------
ID_Date INT (PK, Identity}
ScheduleDate DATE
Comment NVARCHAR(255)
For 11/1/2011 through 4/15/2012, insert one row for each date.
-
Richard Ray
Jackson Hole Mountain Resort