-- ----------------------------------------------------------- LOADING OF DATA: load_model
--                                                                          ft, 1999.07.21
--
update load_model set model_acronym         = 'not filled'  where model_acronym          is NULL;
update load_model set model_name            = 'not filled'  where model_name             is NULL;
update load_model set model_type_acronym    = 'not filled'  where model_type_acronym     is NULL;
update load_model set topic_name            = 'not filled'  where topic_name             is NULL;
update load_model set value_number          = 0             where value_number           is NULL;
update load_model set unit_name             = 'not filled'  where unit_name              is NULL;
update load_model set value_string          = 'not filled'  where value_string           is NULL;
update load_model set calculation_start     = SYSDATE       where calculation_start      is NULL;
--
-- ------------------------------------------------ entering data into MODEL_INPUT relation:
insert into MODEL_INPUT (entry_id,     model_id, topic_id, 
                         value_number, unit_id,  value_string, calculation_start)
  select                 entry_id,     model_id, topic_id, 
                         value_number, unit_id,  value_string, calculation_start
  from LOAD_MODEL, TOPIC, UNIT, MODEL
 where LOAD_MODEL.topic_name    = TOPIC.topic_name
   and LOAD_MODEL.unit_name     = UNIT.unit_name
   and LOAD_MODEL.model_name    = MODEL.model_name ;
