insert into dw_terminal_2_door_state_definition (terminal_id, door_state_definition_id, deleted, version, date_created, last_updated, update_counter) select terminal_door_state_definitions_id, door_state_definition_id, false, 0, curdate(), curdate(), 0 from dw_terminal_dw_door_state_definition