update tbl_EVT_Events set eventName = , comments = , ccLocalManager = , ccDivisionManager = where ownerType = and ownerId = and eventId = update tbl_WRK_Calendars set calendarName = where ownerType = and ownerId = and calendarId = update tbl_SVY_Questions set questionPrompt = where questionId = and questionName = 'EVENTQUESTION' update tbl_SVY_SurveyQuestions set sortOrder = where surveyId = and questionId = delete from tbl_SVY_Questions where questionId = and questionName = 'EVENTQUESTION' delete from tbl_SVY_SurveyQuestions where surveyId = and questionId = insert into tbl_SVY_Questions ( ownerId, ownerType, questionPrompt, questionName, maxSelections ) values ( , , , , 1 ) insert into tbl_SVY_SurveyQuestions ( ownerId, ownertype, surveyId, questionId, sortOrder, answerRequired ) values ( , , , , , ) select distinct a.appointmentid from tbl_WRK_Calendars c with (nolock) inner join tbl_WRK_Appointments a with (nolock) on c.calendarID = a.calendarID where a.ownerid = and a.ownerType = and c.linkType = 'EVT' and c.linkId = update tbl_WRK_Appointments set partnerId = , partnerType = , title = , calendarId = , contactId = , updateDate = , updateUserId = where ownerType = and ownerId = and appointmentId = insert into tbl_WRK_Appointments ( ownerId, ownerType, calendarId, startTime, partnerId, partnerType, contactId, duration, durationUOM, createUserId, createDate, updateUserId, updateDate, title, userId ) values ( , , , , , , , , , , , , , , 0 ) delete from tbl_WRK_Appointments where ownerType = and ownerId = and appointmentId = insert into tbl_EVT_EventDates( eventId, eventDay, eventDate, StartTime, startTimePeriod, apptDurationMinutes ) values (, , , , , ) insert into tbl_WRK_Calendars( ownerId, ownerType, linkType, linkId, calendarName ) values (, , 'EVT', , ) --->