DECLARE @ConfRoomNumber INT
DECLARE TmpCursor CURSOR FOR
  SELECT ConferenceRoomNumber
  FROM ConferenceRooms (NOLOCK)
  WHERE ISNULL(Istable ,0) = 0
OPEN TmpCursor
FETCH NEXT FROM TmpCursor INTO @ConfRoomNumber
WHILE (@@FETCH_STATUS <> -1)
BEGIN
  IF NOT EXISTS (SELECT ConferenceRoomNumber FROM ConferenceRoomMonetXTab (NOLOCK) WHERE ConferenceRoomNumber = @ConfRoomNumber)
  BEGIN
    INSERT INTO ConferenceRoomMonetXTab (ConferenceRoomNumber, MonetGroupNumber) VALUES (@ConfRoomNumber, 0)
  END
  FETCH NEXT FROM TmpCursor INTO @ConfRoomNumber
END
Close TmpCursor
DEALLOCATE TmpCursor
