UPDATE [dbo].[pal_CalendarRoom] SET calendarId = (Select top 1 recid from pal_Calendar)
Where (calendarId Is Null OR calendarId = 0)


UPDATE [dbo].[pal_CalendarEventType] SET calendarId = (Select top 1 recid from pal_Calendar)
Where (calendarId Is Null OR calendarId = 0)



UPDATE [dbo].[pal_CalendarStatus] SET calendarId = (Select top 1 recid from pal_Calendar)
Where (calendarId Is Null OR calendarId = 0)