HK HelpDesk AND  HelpDesk Help Desk  
print

Duplicate A Year's Worth Of Events

To duplicate a year's worth of events run this SQL to create the new events:


UPDATED 8/1/2011:
INSERT INTO calendar
SELECT CalendarDate + 364 AS CalendarDate, Eventname, EventDescription, EventType, Location, StartTime, STAMPM, EndTime, ETAMPM, Price, Contact,
Phone, Email, Website, SKU, Recurring, RID, OrganizationID, Active, CategoryID, UpdateDate, UpdatedBy, Image, IncludeTime, IncludeDate,
IncludeLocation, IncludeLoginInstructions, ExcludeFromCalendar, ExcludeFromHomePage, TeacherID, IncludeEndTime, CalendarDateDT
FROM calendar
WHERE (OrganizationID = 2) AND (CalendarDate > '07/01/2010')
ORDER BY CalendarDate + 364




UPDATED: 8/18/2010
insert into calendar
SELECT CalendarDate, Eventname, EventDescription, EventType, Location, StartTime, STAMPM, EndTime, ETAMPM, Price, Contact, Phone, Email, Website,
SKU, Recurring, RID, OrganizationID, Active, CategoryID, UpdateDate, UpdatedBy, Image, IncludeTime, IncludeDate, IncludeLocation,
IncludeLoginInstructions, ExcludeFromCalendar, ExcludeFromHomePage, TeacherID, IncludeEndTime
FROM calendar c
WHERE (OrganizationID = 2) AND (CalendarDate > '08/01/2009')
ORDER BY CalendarDate DESC


Then run this SQL to add 364 days to the event date:


Update Calendar
set calendardate = calendardate + 364
where organizationid = 2 and calendar_id > #newest calendar ID#


The newest calendar id needs to be deterimined by viewing calendarr events that were added by the insert statement


Message Log (most current on top)

 


Paperless PTO Help Desk v6.0.3.0