insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.06' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='1') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.06' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='1') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.04' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='2') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.04' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='2') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.03' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='3') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.03' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='3') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.01' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='4') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.01' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='4') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='5') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='5') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.05' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='6') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.05' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='6') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='7') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='7') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.42' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='8') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.42' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='8') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.34' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='9') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.34' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='9') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.5' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='10') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.5' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='10') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.61' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='11') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.61' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='11') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.23' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='12') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='12') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.87' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='13') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.77' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='13') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.77' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='14') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.67' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='14') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.7' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='15') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.61' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='15') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.59' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='16') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.51' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='16') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.23' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='17') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='17') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.87' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='18') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.77' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='18') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.77' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='19') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.67' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='19') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.7' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='20') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.61' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='20') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.59' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='21') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.51' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='21') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.34' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='22') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.17' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='22') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.55' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='23') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.47' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='23') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.17' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='24') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.17' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='24') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='25') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='25') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='26') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='26') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.27' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='27') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.14' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='27') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='28') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.99' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='28') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.97' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='29') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.86' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='29') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.84' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='30') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.74' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='30') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.73' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='31') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.64' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='31') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.27' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='32') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.14' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='32') or (i.name='ROB' and iv.value='1') );
insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.11' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='33') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.99' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='33') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.97' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='34') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.86' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='34') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.84' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='35') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.74' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='35') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.73' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='36') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.64' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='36') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.69' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='37') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.48' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='37') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.28' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='38') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.09' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='38') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.95' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='39') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.78' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='39') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.68' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='40') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.53' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='40') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.95' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='41') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.78' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='41') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.57' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='42') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.54' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='42') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.54' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='43') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.54' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='43') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.46' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='44') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.44' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='44') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.44' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='45') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.44' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='45') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.37' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='46') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.35' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='46') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.35' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='47') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.35' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='47') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.64' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='48') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.55' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='48') or (i.name='ROB' and iv.value='1') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.69' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='49') or (i.name='ROB' and iv.value='0') );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.69' and r.name='a_ICH*' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='CH_a' and iv.value='49') or (i.name='ROB' and iv.value='1') );
insert into r_result(name) values('a_IecsB');insert into r_result_val(value, result_id) select '1.72', r.id from r_result r where r.name='a_IecsB';insert into r_result_val(value, result_id) select '1.57', r.id from r_result r where r.name='a_IecsB';insert into r_result_val(value, result_id) select '1.49', r.id from r_result r where r.name='a_IecsB';insert into r_result_val(value, result_id) select '1.41', r.id from r_result r where r.name='a_IecsB';insert into r_result_val(value, result_id) select '1.42', r.id from r_result r where r.name='a_IecsB';insert into r_result_val(value, result_id) select '1.38', r.id from r_result r where r.name='a_IecsB';insert into r_result(name) values('a_IecsG');insert into r_result_val(value, result_id) select '2.12', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '3.52', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '1.99', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '2.77', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '1.81', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '2.57', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '1.75', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '2.48', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '1.62', r.id from r_result r where r.name='a_IecsG';insert into r_result_val(value, result_id) select '2.31', r.id from r_result r where r.name='a_IecsG';insert into r_result(name) values('a_IecsRI');insert into r_result_val(value, result_id) select '1.87', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.37', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '3.16', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.32', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.91', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.13', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.7', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.98', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.52', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.85', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.36', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.73', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.88', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.11', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.5', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.83', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '3.16', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.32', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.91', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.13', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.7', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.98', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.52', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.85', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.36', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.73', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '4.54', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '3.94', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '4.05', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.97', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '2.39', r.id from r_result r where r.name='a_IecsRI';insert into r_result_val(value, result_id) select '1.75', r.id from r_result r where r.name='a_IecsRI';insert into r_result(name) values('a_IecsDef');insert into r_result_val(value, result_id) select '1.14', r.id from r_result r where r.name='a_IecsDef'; insert into r_result_val(value, result_id) select '2.26', r.id from r_result r where r.name='a_IecsDef'; insert into r_result_val(value, result_id) select '3.52', r.id from r_result r where r.name='a_IecsDef'; insert into r_result_val(value, result_id) select '2.77', r.id from r_result r where r.name='a_IecsDef'; insert into r_result_val(value, result_id) select '2.57', r.id from r_result r where r.name='a_IecsDef'; insert into r_result_val(value, result_id) select '2.48', r.id from r_result r where r.name='a_IecsDef'; insert into r_result_val(value, result_id) select '2.31', r.id from r_result r where r.name='a_IecsDef'; 
insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.72' and r.name='a_IecsB' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='B' and iv.value='1')    or (i.name='ECS_a' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.57' and r.name='a_IecsB' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='B' and iv.value='2')    or (i.name='ECS_a' and iv.value='1')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.49' and r.name='a_IecsB' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='B' and iv.value='1')    or (i.name='ECS_a' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.41' and r.name='a_IecsB' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='B' and iv.value='2')    or (i.name='ECS_a' and iv.value='2')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.42' and r.name='a_IecsB' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='B' and iv.value='1')    or (i.name='ECS_a' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.38' and r.name='a_IecsB' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='B' and iv.value='2')    or (i.name='ECS_a' and iv.value='3')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.12' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='1')    or (i.name='ECS_a' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.52' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='2')    or (i.name='ECS_a' and iv.value='6')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.99' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='1')    or (i.name='ECS_a' and iv.value='7')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.77' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='2')    or (i.name='ECS_a' and iv.value='7')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.81' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='1')    or (i.name='ECS_a' and iv.value='8')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.57' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='2')    or (i.name='ECS_a' and iv.value='8')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.75' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='1')    or (i.name='ECS_a' and iv.value='9')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.48' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='2')    or (i.name='ECS_a' and iv.value='9')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.62' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='1')    or (i.name='ECS_a' and iv.value='10')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.31' and r.name='a_IecsG' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='G' and iv.value='2')    or (i.name='ECS_a' and iv.value='10')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.87' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='16')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.37' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='16')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.16' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='17')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.32' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='17')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.91' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='18')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.13' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='18')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.7' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='19')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.98' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='19')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.52' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='20')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.85' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='20')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.36' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='21')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.73' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='21')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.88' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='22')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.11' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='22')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.5' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='23')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.83' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='23')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.16' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='24')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.32' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='24')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.91' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='25')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.13' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='25')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.7' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='26')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.98' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='26')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.52' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='27')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.85' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='27')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.36' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='28')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.73' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='28')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4.54' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='29')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.94' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='29')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4.05' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='30')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.97' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='30')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.39' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='0')    or (i.name='ECS_a' and iv.value='31')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.75' and r.name='a_IecsRI' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (       (i.name='RI' and iv.value='1')    or (i.name='ECS_a' and iv.value='31')     );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.14' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='4')     ); insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.26' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='5')     ); insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.52' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='11')     ); insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.77' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='12')     ); insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.57' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='13')     ); insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.48' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='14')     ); insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.31' and r.name='a_IecsDef' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (   (i.name='ECS_a' and iv.value='15')     ); 
insert into r_result(name) values('a_Rclim');insert into r_result_val(value, result_id) select '1.5', r.id from r_result r where r.name='a_Rclim';insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='a_Rclim'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.5' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='1') or (i.name='ZETE' and iv.value='1')  );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='0') or (i.name='ZETE' and iv.value='1')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='a_Rclim';insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='a_Rclim'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='1') or (i.name='ZETE' and iv.value='2')  );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='0') or (i.name='ZETE' and iv.value='2')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='a_Rclim';insert into r_result_val(value, result_id) select '4', r.id from r_result r where r.name='a_Rclim'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='1') or (i.name='ZETE' and iv.value='3')  );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='0') or (i.name='ZETE' and iv.value='3')  );insert into r_result_val(value, result_id) select '4', r.id from r_result r where r.name='a_Rclim';insert into r_result_val(value, result_id) select '5', r.id from r_result r where r.name='a_Rclim'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='1') or (i.name='ZETE' and iv.value='4')  );insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5' and r.name='a_Rclim' and not exists   (select * from r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where ( (i.name='BigCF' and iv.value='0') or (i.name='ZETE' and iv.value='4')  );


-- Pour les simulateurs Primes
insert into r_input(name) values('ZONE');insert into r_input_val(value, input_id, title) select '1', i.id, 'H1' from r_input i where i.name='ZONE';insert into r_input_val(value, input_id, title) select '2', i.id, 'H2' from r_input i where i.name='ZONE';insert into r_input_val(value, input_id, title) select '3', i.id, 'H3' from r_input i where i.name='ZONE';insert into r_input(name) values('ACFLAG');insert into r_input_val(value, input_id, title) select '1', i.id, 'Avant 1975' from r_input i where i.name='ACFLAG';insert into r_input_val(value, input_id, title) select '2', i.id, 'Après 1975 et achevée depuis plus de 2 ans' from r_input i where i.name='ACFLAG';insert into r_input(name) values('LOG');insert into r_input_val(value, input_id, title, image_url) select '1', i.id, 'Maison', 'maison.png' from r_input i where i.name='LOG';insert into r_input_val(value, input_id, title, image_url) select '2', i.id, 'Appartement', 'appartement.png' from r_input i where i.name='LOG';insert into r_input_val(value, input_id, title, image_url) select '3', i.id, 'Immeuble collectif', 'appartement.png' from r_input i where i.name='LOG';insert into r_input(name) values('ENR');insert into r_input_val(value, input_id, title) select '1', i.id, 'Électricité' from r_input i where i.name='ENR';insert into r_input_val(value, input_id, title) select '2', i.id, 'Combustible (gaz, fioul, bois)' from r_input i where i.name='ENR';insert into r_input(name) values('OWNER');insert into r_input_val(value, input_id, title) select '1', i.id, 'Propriétaire' from r_input i where i.name='OWNER';insert into r_input_val(value, input_id, title) select '2', i.id, 'Locataire' from r_input i where i.name='OWNER';insert into r_input_val(value, input_id, title) select '3', i.id, 'Autre' from r_input i where i.name='OWNER';insert into r_input(name) values('SEC');insert into r_input_val(value, input_id, title) select '1', i.id, 'Bureaux' from r_input i where i.name='SEC';insert into r_input_val(value, input_id, title) select '2', i.id, 'Enseignement' from r_input i where i.name='SEC';insert into r_input_val(value, input_id, title) select '3', i.id, 'Commerces' from r_input i where i.name='SEC';insert into r_input_val(value, input_id, title) select '4', i.id, 'Hôtel / restaurant' from r_input i where i.name='SEC';insert into r_input_val(value, input_id, title) select '5', i.id, 'Santé' from r_input i where i.name='SEC';insert into r_input_val(value, input_id, title) select '6', i.id, 'Autres secteurs' from r_input i where i.name='SEC';insert into r_input(name) values('SEC2');insert into r_input_val(value, input_id, title) select '1', i.id, 'Cinémas' from r_input i where i.name='SEC2';insert into r_input_val(value, input_id, title) select '2', i.id, 'Salles d\'un volume supérieur à 250 m3' from r_input i where i.name='SEC2';insert into r_input_val(value, input_id, title) select '3', i.id, 'Enseignement' from r_input i where i.name='SEC2';insert into r_input_val(value, input_id, title) select '4', i.id, 'Restauration' from r_input i where i.name='SEC2';insert into r_input_val(value, input_id, title) select '5', i.id, 'Autres locaux' from r_input i where i.name='SEC2';insert into r_input(name) values('SEC3');insert into r_input_val(value, input_id, title) select '1', i.id, 'Santé avec hébergement' from r_input i where i.name='SEC3';insert into r_input_val(value, input_id, title) select '2', i.id, 'Hôtels et autres hébergements' from r_input i where i.name='SEC3';insert into r_input_val(value, input_id, title) select '3', i.id, 'Santé sans hébergements' from r_input i where i.name='SEC3';insert into r_input_val(value, input_id, title) select '4', i.id, 'Bureaux, restauration, commerces' from r_input i where i.name='SEC3';insert into r_input_val(value, input_id, title) select '5', i.id, 'Autres secteurs' from r_input i where i.name='SEC3';insert into r_input(name) values('SEC4');insert into r_input_val(value, input_id, title) select '1', i.id, 'Enseignement' from r_input i where i.name='SEC4';insert into r_input_val(value, input_id, title) select '2', i.id, 'Salles d\'un volume supérieur à 250 m3' from r_input i where i.name='SEC4';insert into r_input_val(value, input_id, title) select '3', i.id, 'Autres locaux' from r_input i where i.name='SEC4';insert into r_input_val(value, input_id, title) select '4', i.id, 'Bureaux' from r_input i where i.name='SEC4';insert into r_input_val(value, input_id, title) select '5', i.id, 'Locaux sportifs' from r_input i where i.name='SEC4';insert into r_input(name) values('SEC5');insert into r_input_val(value, input_id, title) select '1', i.id, 'Cinémas' from r_input i where i.name='SEC5';insert into r_input_val(value, input_id, title) select '2', i.id, 'Salles d\'un volume supérieur à 250 m3' from r_input i where i.name='SEC5';insert into r_input_val(value, input_id, title) select '3', i.id, 'Enseignement' from r_input i where i.name='SEC5';insert into r_input_val(value, input_id, title) select '4', i.id, 'Autres locaux' from r_input i where i.name='SEC5';insert into r_input(name) values('ENER');insert into r_input_val(value, input_id, title) select '1', i.id, 'Électricité' from r_input i where i.name='ENER';insert into r_input_val(value, input_id, title) select '2', i.id, 'Combustible (gaz, fioul, bois)' from r_input i where i.name='ENER';insert into r_input(name) values('SHCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, 'S < 35' from r_input i where i.name='SHCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '35 <= S < 60' from r_input i where i.name='SHCLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '60<= S < 80' from r_input i where i.name='SHCLASS';insert into r_input_val(value, input_id, title) select '4', i.id, '80 <= S < 100' from r_input i where i.name='SHCLASS';insert into r_input_val(value, input_id, title) select '5', i.id, '100 <= S <= 130' from r_input i where i.name='SHCLASS';insert into r_input_val(value, input_id, title) select '6', i.id, 'S > 130' from r_input i where i.name='SHCLASS';insert into r_input(name) values('COPAA');insert into r_input(name) values('COPEE');insert into r_input(name) values('COPAE');insert into r_input(name) values('COPAACLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '< 3,4' from r_input i where i.name='COPAACLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '3,4 <= COP < 3,6' from r_input i where i.name='COPAACLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '> 3,6' from r_input i where i.name='COPAACLASS';insert into r_input(name) values('COPEECLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '< 3,4' from r_input i where i.name='COPEECLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '3,4 <= COP < 3,5' from r_input i where i.name='COPEECLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '3,5 <= COP < 3,6' from r_input i where i.name='COPEECLASS';insert into r_input_val(value, input_id, title) select '4', i.id, '> 3,6' from r_input i where i.name='COPEECLASS';insert into r_input(name) values('COPAECLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '< 3,4' from r_input i where i.name='COPAECLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '3,4 <= COP < 3,5' from r_input i where i.name='COPAECLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '3,5 <= COP < 3,6' from r_input i where i.name='COPAECLASS';insert into r_input_val(value, input_id, title) select '4', i.id, '> 3,6' from r_input i where i.name='COPAECLASS';insert into r_input(name) values('RAD');insert into r_input(name) values('NCAPCESI');insert into r_input(name) values('SCAPCESI');insert into r_input(name) values('SCAPSSC');insert into r_input(name) values('SISOC');insert into r_input(name) values('RC');insert into r_input(name) values('SISOM');insert into r_input(name) values('RM');insert into r_input(name) values('SISOP');insert into r_input(name) values('RP');insert into r_input(name) values('SISOT');insert into r_input(name) values('RT');insert into r_input_val(value, input_id, title) select '3', i.id, 'Inférieure à 3.5' from r_input i where i.name='RT';insert into r_input_val(value, input_id, title) select '4', i.id, 'Supérieure ou égale à 3.5' from r_input i where i.name='RT';insert into r_input(name) values('FEN');insert into r_input(name) values('UW');insert into r_input(name) values('HYG');insert into r_input_val(value, input_id, title) select '1', i.id, 'Hygro A' from r_input i where i.name='HYG';insert into r_input_val(value, input_id, title) select '2', i.id, 'Hygro B' from r_input i where i.name='HYG';insert into r_input(name) values('Teff');insert into r_input(name) values('TeffCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '< 15' from r_input i where i.name='TeffCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '15 <= teff =< 25' from r_input i where i.name='TeffCLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '25 < teff <= 50' from r_input i where i.name='TeffCLASS';insert into r_input_val(value, input_id, title) select '4', i.id, '50 < teff <= 75' from r_input i where i.name='TeffCLASS';insert into r_input_val(value, input_id, title) select '5', i.id, '75 < teff <= 100' from r_input i where i.name='TeffCLASS';insert into r_input(name) values('NUH');insert into r_input(name) values('MONT');insert into r_input_val(value, input_id, title) select '1', i.id, 'débits inégaux' from r_input i where i.name='MONT';insert into r_input_val(value, input_id, title) select '2', i.id, 'débits égaux' from r_input i where i.name='MONT';insert into r_input(name) values('CUSAGE2');insert into r_input_val(value, input_id, title) select '1', i.id, 'Chauffage' from r_input i where i.name='CUSAGE2';insert into r_input_val(value, input_id, title) select '2', i.id, 'Chauffage et eau chaude sanitaire accumulée' from r_input i where i.name='CUSAGE2';insert into r_input_val(value, input_id, title) select '3', i.id, 'Chauffage et eau chaude sanitaire instantanée' from r_input i where i.name='CUSAGE2';insert into r_input(name) values('PVEV');insert into r_input(name) values('POWER');insert into r_input(name) values('POWERCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '< 30 kW' from r_input i where i.name='POWERCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '>= 30 kW' from r_input i where i.name='POWERCLASS';insert into r_input(name) values('SCHAUF');insert into r_input(name) values('SCHAUF_GT');insert into r_input(name) values('CUSAGE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Chauffage' from r_input i where i.name='CUSAGE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Chauffage et eau chaude sanitaire' from r_input i where i.name='CUSAGE';insert into r_input(name) values('SISOF');insert into r_input(name) values('LISOH');insert into r_input(name) values('LISOEC');insert into r_input(name) values('PTH');insert into r_input(name) values('PES');insert into r_input(name) values('TERCOPCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '< 3,4' from r_input i where i.name='TERCOPCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '3,4 <= COP < 3,5' from r_input i where i.name='TERCOPCLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '3,5 <= COP < 3,6' from r_input i where i.name='TERCOPCLASS';insert into r_input_val(value, input_id, title) select '4', i.id, '> 3,6' from r_input i where i.name='TERCOPCLASS';insert into r_input(name) values('TENR');insert into r_input(name) values('APPVEV');insert into r_input_val(value, input_id, title) select '1', i.id, 'Chauffage, pompage' from r_input i where i.name='APPVEV';insert into r_input_val(value, input_id, title) select '2', i.id, 'Ventilation, renouvellement d\'air : locaux assurant un hébergement' from r_input i where i.name='APPVEV';insert into r_input_val(value, input_id, title) select '3', i.id, 'Ventilation, renouvellement d\'air : autres locaux' from r_input i where i.name='APPVEV';insert into r_input_val(value, input_id, title) select '4', i.id, 'Réfrigération' from r_input i where i.name='APPVEV';insert into r_input_val(value, input_id, title) select '5', i.id, 'Climatisation' from r_input i where i.name='APPVEV';insert into r_input(name) values('PENGINETER');insert into r_input(name) values('PCLIM');insert into r_input(name) values('LEDGEST');insert into r_input_val(value, input_id, title) select '1', i.id, 'Sans gestion de l\'éclairage' from r_input i where i.name='LEDGEST';insert into r_input_val(value, input_id, title) select '2', i.id, 'Détection de présence OU variation de lumière' from r_input i where i.name='LEDGEST';insert into r_input_val(value, input_id, title) select '3', i.id, 'Détection de présence ET variation de lumière' from r_input i where i.name='LEDGEST';insert into r_input(name) values('LUMGEST');insert into r_input_val(value, input_id, title) select '1', i.id, 'Sans gestion automatique' from r_input i where i.name='LUMGEST';insert into r_input_val(value, input_id, title) select '2', i.id, 'Contrôle détection présence OU variation de lumière' from r_input i where i.name='LUMGEST';insert into r_input_val(value, input_id, title) select '3', i.id, 'Détection de présence ET variation de lumière' from r_input i where i.name='LUMGEST';insert into r_input(name) values('LEDLIFE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Supérieure ou égale à 20 000 heures' from r_input i where i.name='LEDLIFE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Supérieure ou égale à 40 000 heures' from r_input i where i.name='LEDLIFE';insert into r_input(name) values('NLED');insert into r_input(name) values('SFROID');insert into r_input(name) values('SE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Oui' from r_input i where i.name='SE';insert into r_input_val(value, input_id, title) select '0', i.id, 'Non' from r_input i where i.name='SE';insert into r_input(name) values('SELENGTH');insert into r_input_val(value, input_id, title) select '1', i.id, '1 an' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '2', i.id, '2 ans' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '3', i.id, '3 ans' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '4', i.id, '4 ans' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '5', i.id, '5 ans' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '6', i.id, '6 ans' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '7', i.id, '7 ans' from r_input i where i.name='SELENGTH';insert into r_input_val(value, input_id, title) select '8', i.id, '8 ans' from r_input i where i.name='SELENGTH';insert into r_input(name) values('NPROG');insert into r_input(name) values('NAPP');insert into r_input(name) values('PAERO');insert into r_input(name) values('HLOC');insert into r_input(name) values('HLOCCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '5 <= h < 10' from r_input i where i.name='HLOCCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, 'h >= 10' from r_input i where i.name='HLOCCLASS';insert into r_input(name) values('MFUNC');insert into r_input_val(value, input_id, title) select '1', i.id, '1 fois 8h' from r_input i where i.name='MFUNC';insert into r_input_val(value, input_id, title) select '2', i.id, '2 fois 8h' from r_input i where i.name='MFUNC';insert into r_input_val(value, input_id, title) select '3', i.id, '3 fois 8h avec arrêt le week-end' from r_input i where i.name='MFUNC';insert into r_input_val(value, input_id, title) select '4', i.id, '3 fois 8h sans arrêt le week-end' from r_input i where i.name='MFUNC';insert into r_input(name) values('PENGINE');insert into r_input(name) values('PENGINE2');insert into r_input(name) values('APPENGINE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Pompage' from r_input i where i.name='APPENGINE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Ventilation' from r_input i where i.name='APPENGINE';insert into r_input_val(value, input_id, title) select '3', i.id, 'Air comprimé' from r_input i where i.name='APPENGINE';insert into r_input_val(value, input_id, title) select '4', i.id, 'Compresseur froid' from r_input i where i.name='APPENGINE';insert into r_input_val(value, input_id, title) select '5', i.id, 'Broyeurs, convoyeurs, agitateurs' from r_input i where i.name='APPENGINE';insert into r_input(name) values('PENGINECLASS');insert into r_input_val(value, input_id, title) select '1', i.id, 'P <= 630 kW' from r_input i where i.name='PENGINECLASS';insert into r_input_val(value, input_id, title) select '2', i.id, 'P > 630 kW' from r_input i where i.name='PENGINECLASS';insert into r_input(name) values('PLIGHT');insert into r_input(name) values('NLIGHT');insert into r_input(name) values('PLIGHTSOD');insert into r_input_val(value, input_id, title) select '1', i.id, 'Puissance <= 70 W' from r_input i where i.name='PLIGHTSOD';insert into r_input_val(value, input_id, title) select '2', i.id, '70 < Puissance < 250 W' from r_input i where i.name='PLIGHTSOD';insert into r_input_val(value, input_id, title) select '3', i.id, 'Puissance >= 250 W' from r_input i where i.name='PLIGHTSOD';insert into r_input(name) values('SCOND');insert into r_input_val(value, input_id, title) select '1', i.id, 'Condensation par rapport à l\'atmosphère' from r_input i where i.name='SCOND';insert into r_input_val(value, input_id, title) select '2', i.id, 'Condensateurs eau seuls' from r_input i where i.name='SCOND';insert into r_input(name) values('DeltaTypeCond');insert into r_input_val(value, input_id, title) select '1', i.id, 'Sur air sec' from r_input i where i.name='DeltaTypeCond';insert into r_input_val(value, input_id, title) select '2', i.id, 'Sur air humide' from r_input i where i.name='DeltaTypeCond';insert into r_input(name) values('PCOMP');insert into r_input(name) values('EVAPLEVEL');insert into r_input_val(value, input_id, title) select '1', i.id, 'Très basses températeurs (de -56°C à -26°C); températeure d\'évaporation moyenne =-38°C' from r_input i where i.name='EVAPLEVEL';insert into r_input_val(value, input_id, title) select '2', i.id, 'Basses températeurs (de -25°C à -6°C); températeure d\'évaporation moyenne =-15°C' from r_input i where i.name='EVAPLEVEL';insert into r_input_val(value, input_id, title) select '3', i.id, 'Froid positif (de -5°C à 5°C); températeure d\'évaporation moyenne =0°C' from r_input i where i.name='EVAPLEVEL';insert into r_input(name) values('CONDFUNC');insert into r_input_val(value, input_id, title) select '1', i.id, '1x8 (5j/7)' from r_input i where i.name='CONDFUNC';insert into r_input_val(value, input_id, title) select '2', i.id, '2x8 (5j/7)' from r_input i where i.name='CONDFUNC';insert into r_input_val(value, input_id, title) select '3', i.id, '2x8 (6j/7)' from r_input i where i.name='CONDFUNC';insert into r_input_val(value, input_id, title) select '4', i.id, '2x8 (7j/7)' from r_input i where i.name='CONDFUNC';insert into r_input_val(value, input_id, title) select '5', i.id, '3x8 (5j/7)' from r_input i where i.name='CONDFUNC';insert into r_input_val(value, input_id, title) select '6', i.id, '3x8 (6j/7)' from r_input i where i.name='CONDFUNC';insert into r_input_val(value, input_id, title) select '7', i.id, '3x8 (7j/7)' from r_input i where i.name='CONDFUNC';insert into r_input(name) values('DTASEC');insert into r_input_val(value, input_id, title) select '1', i.id, '0' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '2', i.id, '1' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '3', i.id, '2' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '4', i.id, '3' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '5', i.id, '4' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '6', i.id, '5' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '7', i.id, '6' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '8', i.id, '7' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '9', i.id, '8' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '10', i.id, '9' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '11', i.id, '10' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '12', i.id, '11' from r_input i where i.name='DTASEC';insert into r_input_val(value, input_id, title) select '13', i.id, '12 ou plus' from r_input i where i.name='DTASEC';insert into r_input(name) values('DTAHUM');insert into r_input_val(value, input_id, title) select '14', i.id, '10' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '15', i.id, '11' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '16', i.id, '12' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '17', i.id, '13' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '18', i.id, '14' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '19', i.id, '15' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '20', i.id, '16' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '21', i.id, '17' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '22', i.id, '18' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '23', i.id, '19' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '24', i.id, '20' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '25', i.id, '21' from r_input i where i.name='DTAHUM';insert into r_input_val(value, input_id, title) select '26', i.id, '22 ou plus' from r_input i where i.name='DTAHUM';
insert into r_input(name) values('DTEAU');insert into r_input_val(value, input_id, title) select '27', i.id, '6 ou moins' from r_input i where i.name='DTEAU';insert into r_input_val(value, input_id, title) select '28', i.id, '7' from r_input i where i.name='DTEAU';insert into r_input_val(value, input_id, title) select '29', i.id, '8 ou plus' from r_input i where i.name='DTEAU';insert into r_input(name) values('DTCOND');insert into r_input_val(value, input_id, title) select '1', i.id, '0' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '2', i.id, '1' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '3', i.id, '2' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '4', i.id, '3' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '5', i.id, '4' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '6', i.id, '5' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '7', i.id, '6' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '8', i.id, '7' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '9', i.id, '8' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '10', i.id, '9' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '11', i.id, '10' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '12', i.id, '11' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '13', i.id, '12 ou plus' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '14', i.id, '10' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '15', i.id, '11' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '16', i.id, '12' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '17', i.id, '13' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '18', i.id, '14' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '19', i.id, '15' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '20', i.id, '16' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '21', i.id, '17' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '22', i.id, '18' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '23', i.id, '19' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '24', i.id, '20' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '25', i.id, '21' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '26', i.id, '22 ou plus' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '27', i.id, '6 ou moins' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '28', i.id, '7' from r_input i where i.name='DTCOND';insert into r_input_val(value, input_id, title) select '29', i.id, '8 ou plus' from r_input i where i.name='DTCOND';insert into r_input(name) values('NATFLUIDE');insert into r_input_val(value, input_id, title) select '1', i.id, 'pour les réseaux de vapeur' from r_input i where i.name='NATFLUIDE';insert into r_input_val(value, input_id, title) select '2', i.id, 'pour les réseaux d\'eau chaude' from r_input i where i.name='NATFLUIDE';insert into r_input_val(value, input_id, title) select '3', i.id, 'pour les réseaux d\'eau surchauffée' from r_input i where i.name='NATFLUIDE';insert into r_input_val(value, input_id, title) select '4', i.id, 'pour les réseaux de fluide organique' from r_input i where i.name='NATFLUIDE';insert into r_input(name) values('MFUNC2');insert into r_input_val(value, input_id, title) select '1', i.id, '1x8' from r_input i where i.name='MFUNC2';insert into r_input_val(value, input_id, title) select '2', i.id, '2x8 ou 3x8 avec arrêt le week-end' from r_input i where i.name='MFUNC2';insert into r_input_val(value, input_id, title) select '3', i.id, '3x8 sans arrêt le week-end' from r_input i where i.name='MFUNC2';insert into r_input(name) values('NPOINT');insert into r_input(name) values('SEQTYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'simple sans option "optimisation d\'énergie"' from r_input i where i.name='SEQTYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'avec option "optimisation d\'énergie"' from r_input i where i.name='SEQTYPE';insert into r_input(name) values('NCOMP');insert into r_input_val(value, input_id, title) select '1', i.id, '2' from r_input i where i.name='NCOMP';insert into r_input_val(value, input_id, title) select '2', i.id, '3' from r_input i where i.name='NCOMP';insert into r_input_val(value, input_id, title) select '3', i.id, '4' from r_input i where i.name='NCOMP';insert into r_input_val(value, input_id, title) select '4', i.id, '5' from r_input i where i.name='NCOMP';insert into r_input_val(value, input_id, title) select '5', i.id, '6' from r_input i where i.name='NCOMP';insert into r_input_val(value, input_id, title) select '6', i.id, '7' from r_input i where i.name='NCOMP';insert into r_input_val(value, input_id, title) select '7', i.id, '8' from r_input i where i.name='NCOMP';insert into r_input(name) values('PCOMPTOT');insert into r_input(name) values('DTEMPREG');insert into r_input_val(value, input_id, title) select '1', i.id, '1' from r_input i where i.name='DTEMPREG';insert into r_input_val(value, input_id, title) select '2', i.id, '2' from r_input i where i.name='DTEMPREG';insert into r_input_val(value, input_id, title) select '3', i.id, '3' from r_input i where i.name='DTEMPREG';insert into r_input_val(value, input_id, title) select '4', i.id, '4' from r_input i where i.name='DTEMPREG';insert into r_input_val(value, input_id, title) select '5', i.id, '5' from r_input i where i.name='DTEMPREG';insert into r_input(name) values('work_start_date');insert into r_input(name) values('P3_SCHAUF');insert into r_input(name) values('P3_SHCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, 'S < 35' from r_input i where i.name='P3_SHCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '35 <= S < 60' from r_input i where i.name='P3_SHCLASS';insert into r_input_val(value, input_id, title) select '3', i.id, '60<= S < 70' from r_input i where i.name='P3_SHCLASS';insert into r_input_val(value, input_id, title) select '4', i.id, '70 <= S < 90' from r_input i where i.name='P3_SHCLASS';insert into r_input_val(value, input_id, title) select '5', i.id, '90 <= S < 110' from r_input i where i.name='P3_SHCLASS';insert into r_input_val(value, input_id, title) select '6', i.id, '110 <= S <= 130' from r_input i where i.name='P3_SHCLASS';insert into r_input_val(value, input_id, title) select '7', i.id, 'S > 130' from r_input i where i.name='P3_SHCLASS';insert into r_input(name) values('P3_COPE');insert into r_input(name) values('P3_COPECLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '3,4 <= COP < 4' from r_input i where i.name='P3_COPECLASS';insert into r_input_val(value, input_id, title) select '2', i.id, 'COP >= 4' from r_input i where i.name='P3_COPECLASS';insert into r_input(name) values('P3_ETAS');insert into r_input(name) values('P3_ETASCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '102% <= Etas < 110 %' from r_input i where i.name='P3_ETASCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, '110% <= Etas < 120 %' from r_input i where i.name='P3_ETASCLASS';insert into r_input_val(value, input_id, title) select '3', i.id, 'Etas >= 120 %' from r_input i where i.name='P3_ETASCLASS';insert into r_input(name) values('P3_COPA');insert into r_input(name) values('P3_COPACLASS');insert into r_input_val(value, input_id, title) select '1', i.id, '3,9 <= COP < 4.3' from r_input i where i.name='P3_COPACLASS';insert into r_input_val(value, input_id, title) select '2', i.id, 'COP >= 4.3' from r_input i where i.name='P3_COPACLASS';insert into r_input(name) values('P3_CH_POWER');insert into r_input(name) values('P3_POWERCLASS');insert into r_input_val(value, input_id, title) select '1', i.id, 'P<= 400 kW' from r_input i where i.name='P3_POWERCLASS';insert into r_input_val(value, input_id, title) select '2', i.id, 'P > 400 kW' from r_input i where i.name='P3_POWERCLASS';insert into r_input(name) values('P3_OTHER_EQ');insert into r_input_val(value, input_id, title) select '0', i.id, 'Non' from r_input i where i.name='P3_OTHER_EQ';insert into r_input_val(value, input_id, title) select '1', i.id, 'Oui' from r_input i where i.name='P3_OTHER_EQ';insert into r_input(name) values('P3_TOT_NEW_CH_POWER');insert into r_input(name) values('P3_PAC_POWER');insert into r_input(name) values('P3_CHAUFF_TOT_POWER');insert into r_input(name) values('P3_SELENGTH');insert into r_input_val(value, input_id, title) select '1', i.id, '1 an' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '2', i.id, '2 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '3', i.id, '3 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '4', i.id, '4 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '5', i.id, '5 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '6', i.id, '6 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '7', i.id, '7 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '8', i.id, '8 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '9', i.id, '9 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input_val(value, input_id, title) select '10', i.id, '10 ans' from r_input i where i.name='P3_SELENGTH';insert into r_input(name) values('P3_PVEV');insert into r_input(name) values('P3_FERM');insert into r_input(name) values('P3_LAMP_FC');insert into r_input(name) values('P3_HYDRO_TYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Pomme de douche de classe Z' from r_input i where i.name='P3_HYDRO_TYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Pomme de douche de classe ZZ ou Watersense' from r_input i where i.name='P3_HYDRO_TYPE';insert into r_input_val(value, input_id, title) select '3', i.id, 'Aérateur non régulé de classe Z' from r_input i where i.name='P3_HYDRO_TYPE';insert into r_input_val(value, input_id, title) select '4', i.id, 'Aérateur auto-régulé' from r_input i where i.name='P3_HYDRO_TYPE';insert into r_input(name) values('P3_NHYDRO');insert into r_input(name) values('P3_PAC_COL_POWER');insert into r_input(name) values('P3_TOT_NEW_PAC_POWER');insert into r_input(name) values('P3_C2E_NEW_POWER');insert into r_input(name) values('P3_APPVEV');insert into r_input_val(value, input_id, title) select '1', i.id, 'Chauffage, pompage' from r_input i where i.name='P3_APPVEV';insert into r_input_val(value, input_id, title) select '2', i.id, 'Ventilation, renouvellement d\'air' from r_input i where i.name='P3_APPVEV';insert into r_input_val(value, input_id, title) select '3', i.id, 'Réfrigération' from r_input i where i.name='P3_APPVEV';insert into r_input_val(value, input_id, title) select '4', i.id, 'Climatisation' from r_input i where i.name='P3_APPVEV';insert into r_input_val(value, input_id, title) select '5', i.id, 'Autres applications' from r_input i where i.name='P3_APPVEV';insert into r_input(name) values('P3_RECUP_POWER');insert into r_input(name) values('P3_HEAT_USE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Chauffage de locaux ou d\'ECS' from r_input i where i.name='P3_HEAT_USE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Procédé industriel' from r_input i where i.name='P3_HEAT_USE';insert into r_input(name) values('P3_COLD_POWER');insert into r_input(name) values('P3_DESTRAT_POWER');insert into r_input(name) values('P3_DESTRAT_TYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Système convectif' from r_input i where i.name='P3_DESTRAT_TYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Système radiatif' from r_input i where i.name='P3_DESTRAT_TYPE';
insert into r_input(name) values('P3_FRIG_POWER');insert into r_input(name) values('P3_PTHERM');insert into r_input(name) values('P3_PRESSE_POWER');insert into r_input(name) values('P3_PRESSE_TYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Presse à injecter toute électrique' from r_input i where i.name='P3_PRESSE_TYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Presse à injecter hybride' from r_input i where i.name='P3_PRESSE_TYPE';insert into r_input_val(value, input_id, title) select '3', i.id, 'Transformation d\'une presse existante en presse hybride' from r_input i where i.name='P3_PRESSE_TYPE';insert into r_input(name) values('P3_MFUNC');insert into r_input_val(value, input_id, title) select '1', i.id, '1x8h ou < 3000 h/an' from r_input i where i.name='P3_MFUNC';insert into r_input_val(value, input_id, title) select '2', i.id, '2x8h ou >= 3000 et < 5000 h/an' from r_input i where i.name='P3_MFUNC';insert into r_input_val(value, input_id, title) select '3', i.id, '3x8h avec arrêt le week-end ou >= 5000 et < 7000 h/an' from r_input i where i.name='P3_MFUNC';insert into r_input_val(value, input_id, title) select '4', i.id, '3x8h sans arrêt le week-end ou >= 7000 h/an' from r_input i where i.name='P3_MFUNC';insert into r_input(name) values('P3_RECUP_FROID_POWER');insert into r_input(name) values('P3_SSERRE');insert into r_input(name) values('P3_SBAT');insert into r_input(name) values('P3_SSERRE_EQ');insert into r_input(name) values('P3_SERTYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Serres maraîchères' from r_input i where i.name='P3_SERTYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Serres horticoles' from r_input i where i.name='P3_SERTYPE';insert into r_input(name) values('P3_AGR_APPVEV');insert into r_input_val(value, input_id, title) select '1', i.id, 'Pompe d’irrigation' from r_input i where i.name='P3_AGR_APPVEV';insert into r_input_val(value, input_id, title) select '2', i.id, 'Ventilateur de bâtiments d’élevage' from r_input i where i.name='P3_AGR_APPVEV';insert into r_input_val(value, input_id, title) select '3', i.id, 'Ventilation d’une serre' from r_input i where i.name='P3_AGR_APPVEV';insert into r_input_val(value, input_id, title) select '4', i.id, 'Pompe à vide d’une salle de traite' from r_input i where i.name='P3_AGR_APPVEV';insert into r_input_val(value, input_id, title) select '5', i.id, 'Chauffage d’une serre (pompe, ventilateur d’un brûleur)' from r_input i where i.name='P3_AGR_APPVEV';insert into r_input_val(value, input_id, title) select '6', i.id, 'Autres applications' from r_input i where i.name='P3_AGR_APPVEV';insert into r_input(name) values('P3_VEV');insert into r_input(name) values('P3_TYPELOG');insert into r_input_val(value, input_id, title) select '1', i.id, 'Logement existant' from r_input i where i.name='P3_TYPELOG';insert into r_input_val(value, input_id, title) select '2', i.id, 'Logement neuf' from r_input i where i.name='P3_TYPELOG';insert into r_input(name) values('P3_LEDLIFE_OM');insert into r_input_val(value, input_id, title) select '1', i.id, '25 000 ≤ Dv < 40 000' from r_input i where i.name='P3_LEDLIFE_OM';insert into r_input_val(value, input_id, title) select '2', i.id, '40 000 ≤ Dv' from r_input i where i.name='P3_LEDLIFE_OM';insert into r_input(name) values('P3_REG_POWER');insert into r_input(name) values('P3_EFFLIGHT');insert into r_input(name) values('P3_ULOR');insert into r_input(name) values('P3_ULR');insert into r_input(name) values('P3_HORLOGE');insert into r_input(name) values('P3_VOYAGE');insert into r_input(name) values('P3_CARCAT');insert into r_input_val(value, input_id, title) select '1', i.id, 'M1' from r_input i where i.name='P3_CARCAT';insert into r_input_val(value, input_id, title) select '2', i.id, 'N1' from r_input i where i.name='P3_CARCAT';insert into r_input_val(value, input_id, title) select '3', i.id, 'N2 et N3' from r_input i where i.name='P3_CARCAT';insert into r_input_val(value, input_id, title) select '4', i.id, 'M2 et M3' from r_input i where i.name='P3_CARCAT';insert into r_input(name) values('P3_NBCARCAT');insert into r_input(name) values('P3_LUBVOL_1');insert into r_input(name) values('P3_LUBVOL_2');insert into r_input(name) values('P3_LUBVOL_3');insert into r_input(name) values('P3_LUBPERF_1');insert into r_input(name) values('P3_LUBPERF_2');insert into r_input(name) values('P3_LUBPERF_3');insert into r_input(name) values('P3_PNEU_A');insert into r_input(name) values('P3_PNEU_B');insert into r_input(name) values('P3_PNEU_C');insert into r_input(name) values('P3_LUBVOL');insert into r_input(name) values('P3_LUBPERF');insert into r_input(name) values('P3_OPTCAR');insert into r_input(name) values('P3_VOLOPT');insert into r_input(name) values('P3_GAINOPT');insert into r_input(name) values('P3_CONCENTROPT');insert into r_input(name) values('P3_FORMTYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Véhicules destinés au transport de marchandises de catégories N2 ou N3' from r_input i where i.name='P3_FORMTYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Véhicules destinés au transport de personnes de catégories M2 ou M3' from r_input i where i.name='P3_FORMTYPE';insert into r_input(name) values('P3_NBPERS');insert into r_input(name) values('P3_FORMTYPE2');insert into r_input_val(value, input_id, title) select '1', i.id, 'Véhicules de catégorie M1' from r_input i where i.name='P3_FORMTYPE2';insert into r_input_val(value, input_id, title) select '2', i.id, 'Véhicules de catégorie N1' from r_input i where i.name='P3_FORMTYPE2';insert into r_input(name) values('P3_TYPESTA');insert into r_input_val(value, input_id, title) select '1', i.id, 'Type A' from r_input i where i.name='P3_TYPESTA';insert into r_input_val(value, input_id, title) select '2', i.id, 'Type B' from r_input i where i.name='P3_TYPESTA';insert into r_input_val(value, input_id, title) select '3', i.id, 'Type C' from r_input i where i.name='P3_TYPESTA';insert into r_input(name) values('P3_NBSTA');insert into r_input(name) values('P3_NBPNEUM');insert into r_input(name) values('P3_CARTYPE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Ensemble articulé' from r_input i where i.name='P3_CARTYPE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Porteur' from r_input i where i.name='P3_CARTYPE';insert into r_input(name) values('P3_NBEXT');insert into r_input(name) values('P3_NBVEHIC');insert into r_input(name) values('P3_NBVEHICOPT');insert into r_input(name) values('P3_NBCARTE');insert into r_input(name) values('P3_UTI');insert into r_input(name) values('P3_PTC');insert into r_input(name) values('P3_MILEAGE');insert into r_input(name) values('P3_TYPE_ENGINE');insert into r_input_val(value, input_id, title) select '1', i.id, 'Moteur à entraînement direct' from r_input i where i.name='P3_TYPE_ENGINE';insert into r_input_val(value, input_id, title) select '2', i.id, 'Motoréducteur à engrenages' from r_input i where i.name='P3_TYPE_ENGINE';insert into r_input_val(value, input_id, title) select '3', i.id, 'Réducteur à engrenages' from r_input i where i.name='P3_TYPE_ENGINE';insert into r_input(name) values('P3_PENGINE');insert into r_input(name) values('P3_VOLBAT');insert into r_input_val(value, input_id, title) select '1', i.id, 'Volailles de chair sans parcours' from r_input i where i.name='P3_VOLBAT';insert into r_input_val(value, input_id, title) select '2', i.id, 'Volailles de chair avec parcours' from r_input i where i.name='P3_VOLBAT';insert into r_input_val(value, input_id, title) select '3', i.id, 'Palmipèdes PAG (prêts à gaver)' from r_input i where i.name='P3_VOLBAT';insert into r_input_val(value, input_id, title) select '4', i.id, 'Futurs reproducteurs' from r_input i where i.name='P3_VOLBAT';insert into r_input_val(value, input_id, title) select '5', i.id, 'Poulettes futures pondeuses' from r_input i where i.name='P3_VOLBAT';insert into r_input_val(value, input_id, title) select '6', i.id, 'Autres types d’élevage de volailles' from r_input i where i.name='P3_VOLBAT';
insert into r_result(name) values('ZONE');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='1')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='2')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='3')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='4')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='5')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='6')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='7')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='8')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='9')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='10')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='11')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='12')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='13')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='14')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='15')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='16')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='17')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='18')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='19')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='20')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='21')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='22')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='23')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='24')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='25')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='26')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='27')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='28')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='29')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='30')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='31')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='32')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='33')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='34')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='35')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='36')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='37')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='38')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='39')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='40')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='41')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='42')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='43')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='44')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='45')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='46')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='47')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='48')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='49')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='50')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='51')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='52')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='53')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='54')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='55')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='56')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='57')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='58')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='59')  );
insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='60')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='61')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='62')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='63')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='64')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='65')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='66')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='67')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='68')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='69')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='70')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='71')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='72')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='73')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='74')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='75')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='76')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='77')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='78')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='79')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='80')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='81')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='82')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='83')  );insert into r_result_val(value, result_id) select '3', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='84')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='85')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='86')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='87')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='88')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='89')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='90')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='91')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='92')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='93')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='94')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='95')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='ZONE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='ZONE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DEPT' and iv.value='96')  );insert into r_result(name) values('FC_SH_M');insert into r_result_val(value, result_id) select '0.2', r.id from r_result r where r.name='FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.2' and r.name='FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.4', r.id from r_result r where r.name='FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='6')  );insert into r_result(name) values('FC_SH_A');insert into r_result_val(value, result_id) select '0.3', r.id from r_result r where r.name='FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.3' and r.name='FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='2')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.7', r.id from r_result r where r.name='FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.7' and r.name='FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='5')  );insert into r_result_val(value, result_id) select '2.2', r.id from r_result r where r.name='FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.2' and r.name='FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SHCLASS' and iv.value='6')  );insert into r_result(name) values('TER_FC_EN1');insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='TER_FC_EN1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='TER_FC_EN1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC_EN1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC_EN1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC_EN1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC_EN1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC_EN1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC_EN1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FC_EN1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FC_EN1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='TER_FC_EN1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='TER_FC_EN1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('TER_FC_EN2');insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='TER_FC_EN2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='TER_FC_EN2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.4', r.id from r_result r where r.name='TER_FC_EN2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='TER_FC_EN2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='TER_FC_EN2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='TER_FC_EN2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.4', r.id from r_result r where r.name='TER_FC_EN2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='TER_FC_EN2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='TER_FC_EN2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='TER_FC_EN2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.4', r.id from r_result r where r.name='TER_FC_EN2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='TER_FC_EN2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );
insert into r_result(name) values('TER_FC_TH1');insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FC_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FC_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='TER_FC_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='TER_FC_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FC_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FC_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='TER_FC_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='TER_FC_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='TER_FC_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='TER_FC_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='TER_FC_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='TER_FC_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('TER_FC_TH2');insert into r_result_val(value, result_id) select '1.3', r.id from r_result r where r.name='TER_FC_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.3' and r.name='TER_FC_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='TER_FC_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='TER_FC_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FC_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FC_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='TER_FC_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='TER_FC_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FC_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FC_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='TER_FC_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='TER_FC_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('TER_FO_TH1');insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FO_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FO_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='TER_FO_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='TER_FO_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='TER_FO_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='TER_FO_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FO_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FO_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='TER_FO_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='TER_FO_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='TER_FO_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='TER_FO_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('TER_FC2_TH1');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='TER_FC2_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='TER_FC2_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC2' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='TER_FC2_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='TER_FC2_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC2' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.3', r.id from r_result r where r.name='TER_FC2_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.3' and r.name='TER_FC2_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC2' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.3', r.id from r_result r where r.name='TER_FC2_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.3' and r.name='TER_FC2_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC2' and iv.value='4')  );insert into r_result_val(value, result_id) select '0.2', r.id from r_result r where r.name='TER_FC2_TH1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.2' and r.name='TER_FC2_TH1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC2' and iv.value='5')  );insert into r_result(name) values('TER_FC2_TH2');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='TER_FC2_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='TER_FC2_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC2_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC2_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='TER_FC2_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='TER_FC2_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.4', r.id from r_result r where r.name='TER_FC2_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.4' and r.name='TER_FC2_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='4')  );insert into r_result_val(value, result_id) select '0.2', r.id from r_result r where r.name='TER_FC2_TH2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.2' and r.name='TER_FC2_TH2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='5')  );insert into r_result(name) values('TER_FC2_TH2_GT');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='TER_FC2_TH2_GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='TER_FC2_TH2_GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC2_TH2_GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC2_TH2_GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC2_TH2_GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC2_TH2_GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='TER_FC2_TH2_GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='TER_FC2_TH2_GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='4')  );insert into r_result_val(value, result_id) select '0.2', r.id from r_result r where r.name='TER_FC2_TH2_GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.2' and r.name='TER_FC2_TH2_GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC4' and iv.value='5')  );insert into r_result(name) values('TER_FC5_TH');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='TER_FC5_TH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='TER_FC5_TH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC5' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC5_TH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC5_TH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC5' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.3', r.id from r_result r where r.name='TER_FC5_TH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.3' and r.name='TER_FC5_TH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC5' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.2', r.id from r_result r where r.name='TER_FC5_TH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.2' and r.name='TER_FC5_TH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC5' and iv.value='4')  );insert into r_result(name) values('CH_COND_MU_M');insert into r_result_val(value, result_id) select '120000', r.id from r_result r where r.name='CH_COND_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120000' and r.name='CH_COND_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '110000', r.id from r_result r where r.name='CH_COND_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110000' and r.name='CH_COND_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '74000', r.id from r_result r where r.name='CH_COND_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='74000' and r.name='CH_COND_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_COND_MU_A');insert into r_result_val(value, result_id) select '61000', r.id from r_result r where r.name='CH_COND_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='61000' and r.name='CH_COND_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '53000', r.id from r_result r where r.name='CH_COND_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='53000' and r.name='CH_COND_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '40000', r.id from r_result r where r.name='CH_COND_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40000' and r.name='CH_COND_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_BAS_MU_M');insert into r_result_val(value, result_id) select '40000', r.id from r_result r where r.name='CH_BAS_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40000' and r.name='CH_BAS_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '34000', r.id from r_result r where r.name='CH_BAS_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='34000' and r.name='CH_BAS_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '24000', r.id from r_result r where r.name='CH_BAS_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24000' and r.name='CH_BAS_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_BAS_MU_A');insert into r_result_val(value, result_id) select '21000', r.id from r_result r where r.name='CH_BAS_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='21000' and r.name='CH_BAS_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '18000', r.id from r_result r where r.name='CH_BAS_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='CH_BAS_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '14000', r.id from r_result r where r.name='CH_BAS_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14000' and r.name='CH_BAS_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_BIO_MU');insert into r_result_val(value, result_id) select '230000', r.id from r_result r where r.name='CH_BIO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='230000' and r.name='CH_BIO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '190000', r.id from r_result r where r.name='CH_BIO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='190000' and r.name='CH_BIO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '130000', r.id from r_result r where r.name='CH_BIO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130000' and r.name='CH_BIO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_BOIS_MU');insert into r_result_val(value, result_id) select '58000', r.id from r_result r where r.name='CH_BOIS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='58000' and r.name='CH_BOIS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '48000', r.id from r_result r where r.name='CH_BOIS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='48000' and r.name='CH_BOIS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '32000', r.id from r_result r where r.name='CH_BOIS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='32000' and r.name='CH_BOIS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('PROG_MU_M');insert into r_result_val(value, result_id) select '28000', r.id from r_result r where r.name='PROG_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='28000' and r.name='PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '23000', r.id from r_result r where r.name='PROG_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='23000' and r.name='PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '15000', r.id from r_result r where r.name='PROG_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='PROG_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );
insert into r_result(name) values('PROG_MU_A');insert into r_result_val(value, result_id) select '13000', r.id from r_result r where r.name='PROG_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13000' and r.name='PROG_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '10000', r.id from r_result r where r.name='PROG_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='PROG_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '6900', r.id from r_result r where r.name='PROG_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6900' and r.name='PROG_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('PROG_ELEC_MU_M');insert into r_result_val(value, result_id) select '18000', r.id from r_result r where r.name='PROG_ELEC_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='PROG_ELEC_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '14000', r.id from r_result r where r.name='PROG_ELEC_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14000' and r.name='PROG_ELEC_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '9200', r.id from r_result r where r.name='PROG_ELEC_MU_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9200' and r.name='PROG_ELEC_MU_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('PROG_ELEC_MU_A');insert into r_result_val(value, result_id) select '5300', r.id from r_result r where r.name='PROG_ELEC_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5300' and r.name='PROG_ELEC_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '4400', r.id from r_result r where r.name='PROG_ELEC_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='PROG_ELEC_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '2900', r.id from r_result r where r.name='PROG_ELEC_MU_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='PROG_ELEC_MU_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('REG_MU');insert into r_result_val(value, result_id) select '9400', r.id from r_result r where r.name='REG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9400' and r.name='REG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '8900', r.id from r_result r where r.name='REG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='8900' and r.name='REG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '5200', r.id from r_result r where r.name='REG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5200' and r.name='REG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CESI_MU');insert into r_result_val(value, result_id) select '6400', r.id from r_result r where r.name='CESI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6400' and r.name='CESI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '7700', r.id from r_result r where r.name='CESI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7700' and r.name='CESI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '10000', r.id from r_result r where r.name='CESI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='CESI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('SSC_MU');insert into r_result_val(value, result_id) select '4050', r.id from r_result r where r.name='SSC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4050' and r.name='SSC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '4050', r.id from r_result r where r.name='SSC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4050' and r.name='SSC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '4050', r.id from r_result r where r.name='SSC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4050' and r.name='SSC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('ISOH_MU');insert into r_result_val(value, result_id) select '5000', r.id from r_result r where r.name='ISOH_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='ISOH_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '4100', r.id from r_result r where r.name='ISOH_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='ISOH_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='ISOH_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='ISOH_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('COMPTAGE_MU');insert into r_result_val(value, result_id) select '20000', r.id from r_result r where r.name='COMPTAGE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='20000' and r.name='COMPTAGE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '18000', r.id from r_result r where r.name='COMPTAGE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='COMPTAGE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '11000', r.id from r_result r where r.name='COMPTAGE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11000' and r.name='COMPTAGE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('EQUI_MU');insert into r_result_val(value, result_id) select '13400', r.id from r_result r where r.name='EQUI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13400' and r.name='EQUI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '11000', r.id from r_result r where r.name='EQUI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11000' and r.name='EQUI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '7400', r.id from r_result r where r.name='EQUI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7400' and r.name='EQUI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_CH_BAS_MU1GT');insert into r_result_val(value, result_id) select '340', r.id from r_result r where r.name='TER_CH_BAS_MU1GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='340' and r.name='TER_CH_BAS_MU1GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '280', r.id from r_result r where r.name='TER_CH_BAS_MU1GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='280' and r.name='TER_CH_BAS_MU1GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '180', r.id from r_result r where r.name='TER_CH_BAS_MU1GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='180' and r.name='TER_CH_BAS_MU1GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_CH_BAS_MU2GT');insert into r_result_val(value, result_id) select '380', r.id from r_result r where r.name='TER_CH_BAS_MU2GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='380' and r.name='TER_CH_BAS_MU2GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '320', r.id from r_result r where r.name='TER_CH_BAS_MU2GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='320' and r.name='TER_CH_BAS_MU2GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '220', r.id from r_result r where r.name='TER_CH_BAS_MU2GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='220' and r.name='TER_CH_BAS_MU2GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_CH_COND_MU1GT');insert into r_result_val(value, result_id) select '780', r.id from r_result r where r.name='TER_CH_COND_MU1GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='780' and r.name='TER_CH_COND_MU1GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '630', r.id from r_result r where r.name='TER_CH_COND_MU1GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='630' and r.name='TER_CH_COND_MU1GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '430', r.id from r_result r where r.name='TER_CH_COND_MU1GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='430' and r.name='TER_CH_COND_MU1GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_CH_COND_MU2GT');insert into r_result_val(value, result_id) select '830', r.id from r_result r where r.name='TER_CH_COND_MU2GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='830' and r.name='TER_CH_COND_MU2GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='TER_CH_COND_MU2GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='TER_CH_COND_MU2GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '510', r.id from r_result r where r.name='TER_CH_COND_MU2GT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='510' and r.name='TER_CH_COND_MU2GT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_PLANCHER_MU');insert into r_result_val(value, result_id) select '140', r.id from r_result r where r.name='TER_PLANCHER_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='140' and r.name='TER_PLANCHER_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '120', r.id from r_result r where r.name='TER_PLANCHER_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PLANCHER_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_PLANCHER_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='80' and r.name='TER_PLANCHER_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_PLANCHER_MUGT');insert into r_result_val(value, result_id) select '120', r.id from r_result r where r.name='TER_PLANCHER_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='120' and r.name='TER_PLANCHER_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_PLANCHER_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_PLANCHER_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '70', r.id from r_result r where r.name='TER_PLANCHER_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='70' and r.name='TER_PLANCHER_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_ROB_MU');insert into r_result_val(value, result_id) select '50', r.id from r_result r where r.name='TER_ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50' and r.name='TER_ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '40', r.id from r_result r where r.name='TER_ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40' and r.name='TER_ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '30', r.id from r_result r where r.name='TER_ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='30' and r.name='TER_ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_ROB_MUGT');insert into r_result_val(value, result_id) select '40', r.id from r_result r where r.name='TER_ROB_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='40' and r.name='TER_ROB_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '30', r.id from r_result r where r.name='TER_ROB_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='30' and r.name='TER_ROB_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '20', r.id from r_result r where r.name='TER_ROB_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='20' and r.name='TER_ROB_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_ISOH_MU');
insert into r_result_val(value, result_id) select '5000', r.id from r_result r where r.name='TER_ISOH_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='TER_ISOH_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '4100', r.id from r_result r where r.name='TER_ISOH_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='TER_ISOH_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='TER_ISOH_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='TER_ISOH_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_PROG_MU');insert into r_result_val(value, result_id) select '130', r.id from r_result r where r.name='TER_PROG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130' and r.name='TER_PROG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='TER_PROG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '70', r.id from r_result r where r.name='TER_PROG_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='70' and r.name='TER_PROG_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_PROG_MUGT');insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='TER_PROG_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110' and r.name='TER_PROG_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '90', r.id from r_result r where r.name='TER_PROG_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='90' and r.name='TER_PROG_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '60', r.id from r_result r where r.name='TER_PROG_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_PROG_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_OPTI_MU');insert into r_result_val(value, result_id) select '180', r.id from r_result r where r.name='TER_OPTI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='180' and r.name='TER_OPTI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '150', r.id from r_result r where r.name='TER_OPTI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_OPTI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_OPTI_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_OPTI_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_OPTI_MUGT');insert into r_result_val(value, result_id) select '150', r.id from r_result r where r.name='TER_OPTI_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='150' and r.name='TER_OPTI_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '130', r.id from r_result r where r.name='TER_OPTI_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='130' and r.name='TER_OPTI_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_OPTI_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='80' and r.name='TER_OPTI_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_FC_PAC');insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_VEV_MU');insert into r_result_val(value, result_id) select '17000', r.id from r_result r where r.name='TER_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='TER_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPVEV' and iv.value='1')  );insert into r_result_val(value, result_id) select '29000', r.id from r_result r where r.name='TER_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='29000' and r.name='TER_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPVEV' and iv.value='2')  );insert into r_result_val(value, result_id) select '11000', r.id from r_result r where r.name='TER_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11000' and r.name='TER_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPVEV' and iv.value='3')  );insert into r_result_val(value, result_id) select '7100', r.id from r_result r where r.name='TER_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7100' and r.name='TER_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPVEV' and iv.value='4')  );insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='TER_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='TER_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPVEV' and iv.value='5')  );insert into r_result(name) values('TER_CLIM_MU');insert into r_result_val(value, result_id) select '450', r.id from r_result r where r.name='TER_CLIM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='450' and r.name='TER_CLIM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_CLIM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_CLIM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '660', r.id from r_result r where r.name='TER_CLIM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='660' and r.name='TER_CLIM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '880', r.id from r_result r where r.name='TER_CLIM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='880' and r.name='TER_CLIM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '0', r.id from r_result r where r.name='TER_CLIM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0' and r.name='TER_CLIM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '450', r.id from r_result r where r.name='TER_CLIM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='450' and r.name='TER_CLIM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('TER_FC_CLIM');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='TER_FC_CLIM'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='TER_FC_CLIM' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='TER_FC_CLIM'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='TER_FC_CLIM' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '2', r.id from r_result r where r.name='TER_FC_CLIM'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2' and r.name='TER_FC_CLIM' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_MU_VENTILO_CH');insert into r_result_val(value, result_id) select '70', r.id from r_result r where r.name='TER_MU_VENTILO_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='70' and r.name='TER_MU_VENTILO_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '61', r.id from r_result r where r.name='TER_MU_VENTILO_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='61' and r.name='TER_MU_VENTILO_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '52', r.id from r_result r where r.name='TER_MU_VENTILO_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='52' and r.name='TER_MU_VENTILO_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_MU_VENTILO_FR');insert into r_result_val(value, result_id) select '11', r.id from r_result r where r.name='TER_MU_VENTILO_FR'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11' and r.name='TER_MU_VENTILO_FR' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '15', r.id from r_result r where r.name='TER_MU_VENTILO_FR'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15' and r.name='TER_MU_VENTILO_FR' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '28', r.id from r_result r where r.name='TER_MU_VENTILO_FR'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='28' and r.name='TER_MU_VENTILO_FR' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_RAD_MU');insert into r_result_val(value, result_id) select '100', r.id from r_result r where r.name='TER_RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100' and r.name='TER_RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='80' and r.name='TER_RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '60', r.id from r_result r where r.name='TER_RAD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60' and r.name='TER_RAD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('TER_RAD_MUGT');insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='TER_RAD_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='80' and r.name='TER_RAD_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '70', r.id from r_result r where r.name='TER_RAD_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='70' and r.name='TER_RAD_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '50', r.id from r_result r where r.name='TER_RAD_MUGT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='50' and r.name='TER_RAD_MUGT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_COND_COL_MU');insert into r_result_val(value, result_id) select '100000', r.id from r_result r where r.name='CH_COND_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='100000' and r.name='CH_COND_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '87000', r.id from r_result r where r.name='CH_COND_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='87000' and r.name='CH_COND_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '65000', r.id from r_result r where r.name='CH_COND_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='65000' and r.name='CH_COND_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('CH_BAS_COL_MU');insert into r_result_val(value, result_id) select '32000', r.id from r_result r where r.name='CH_BAS_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='32000' and r.name='CH_BAS_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '27000', r.id from r_result r where r.name='CH_BAS_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='CH_BAS_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '20000', r.id from r_result r where r.name='CH_BAS_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='20000' and r.name='CH_BAS_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('OPTREL_COL_MU');insert into r_result_val(value, result_id) select '19000', r.id from r_result r where r.name='OPTREL_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19000' and r.name='OPTREL_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '15000', r.id from r_result r where r.name='OPTREL_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='OPTREL_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '10000', r.id from r_result r where r.name='OPTREL_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='OPTREL_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('FM_CH_SE');insert into r_result_val(value, result_id) select '1.04', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.04' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='1')  );insert into r_result_val(value, result_id) select '1.07', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.07' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='2')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.13', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.13' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.16', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.16' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.19', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.19' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='6')  );
insert into r_result_val(value, result_id) select '1.22', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.22' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='7')  );insert into r_result_val(value, result_id) select '1.24', r.id from r_result r where r.name='FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.24' and r.name='FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='8')  );insert into r_result(name) values('FM_CH_BIO_SE');insert into r_result_val(value, result_id) select '1.04', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.04' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='1')  );insert into r_result_val(value, result_id) select '1.07', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.07' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='2')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.13', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.13' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.16', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.16' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.18', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.18' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='6')  );insert into r_result_val(value, result_id) select '1.2', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.2' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='7')  );insert into r_result_val(value, result_id) select '1.22', r.id from r_result r where r.name='FM_CH_BIO_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.22' and r.name='FM_CH_BIO_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SELENGTH' and iv.value='8')  );insert into r_result(name) values('PROG_COMB_COL_MU');insert into r_result_val(value, result_id) select '13000', r.id from r_result r where r.name='PROG_COMB_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='13000' and r.name='PROG_COMB_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '11000', r.id from r_result r where r.name='PROG_COMB_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11000' and r.name='PROG_COMB_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '7100', r.id from r_result r where r.name='PROG_COMB_COL_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7100' and r.name='PROG_COMB_COL_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('RECUP_COND_MU1');insert into r_result_val(value, result_id) select '19000', r.id from r_result r where r.name='RECUP_COND_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19000' and r.name='RECUP_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '15000', r.id from r_result r where r.name='RECUP_COND_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='RECUP_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '10000', r.id from r_result r where r.name='RECUP_COND_MU1'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='10000' and r.name='RECUP_COND_MU1' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('RECUP_COND_MU2');insert into r_result_val(value, result_id) select '24000', r.id from r_result r where r.name='RECUP_COND_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24000' and r.name='RECUP_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '20000', r.id from r_result r where r.name='RECUP_COND_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='20000' and r.name='RECUP_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '15000', r.id from r_result r where r.name='RECUP_COND_MU2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='RECUP_COND_MU2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('IND_MU_STRAT');insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='IND_MU_STRAT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='IND_MU_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '3000', r.id from r_result r where r.name='IND_MU_STRAT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='IND_MU_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='IND_MU_STRAT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='IND_MU_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '4500', r.id from r_result r where r.name='IND_MU_STRAT'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4500' and r.name='IND_MU_STRAT' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('IND_MU_LIGHT5');insert into r_result_val(value, result_id) select '20', r.id from r_result r where r.name='IND_MU_LIGHT5'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='20' and r.name='IND_MU_LIGHT5' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '45', r.id from r_result r where r.name='IND_MU_LIGHT5'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='45' and r.name='IND_MU_LIGHT5' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '60', r.id from r_result r where r.name='IND_MU_LIGHT5'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='60' and r.name='IND_MU_LIGHT5' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '80', r.id from r_result r where r.name='IND_MU_LIGHT5'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='80' and r.name='IND_MU_LIGHT5' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('ALPHACOND');insert into r_result_val(value, result_id) select '7900', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7900' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='1')  );insert into r_result_val(value, result_id) select '7200', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7200' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='2')  );insert into r_result_val(value, result_id) select '6500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='3')  );insert into r_result_val(value, result_id) select '5800', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5800' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='4')  );insert into r_result_val(value, result_id) select '5200', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5200' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='5')  );insert into r_result_val(value, result_id) select '4600', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4600' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='6')  );insert into r_result_val(value, result_id) select '4000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='7')  );insert into r_result_val(value, result_id) select '3500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='8')  );insert into r_result_val(value, result_id) select '3000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='9')  );insert into r_result_val(value, result_id) select '2500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='10')  );insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='11')  );insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='12')  );insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='13')  );insert into r_result_val(value, result_id) select '7900', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7900' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='14')  );insert into r_result_val(value, result_id) select '7200', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7200' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='15')  );insert into r_result_val(value, result_id) select '6500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='16')  );insert into r_result_val(value, result_id) select '5800', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5800' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='17')  );insert into r_result_val(value, result_id) select '5200', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5200' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='18')  );insert into r_result_val(value, result_id) select '4600', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4600' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='19')  );insert into r_result_val(value, result_id) select '4000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='20')  );insert into r_result_val(value, result_id) select '3500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='21')  );insert into r_result_val(value, result_id) select '3000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='22')  );insert into r_result_val(value, result_id) select '2500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='23')  );insert into r_result_val(value, result_id) select '2000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='24')  );insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='25')  );insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='26')  );insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='27')  );insert into r_result_val(value, result_id) select '1500', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='28')  );insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='ALPHACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='ALPHACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='DTCOND' and iv.value='29')  );insert into r_result(name) values('BETACOND');insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='BETACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='BETACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='EVAPLEVEL' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='BETACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='BETACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='EVAPLEVEL' and iv.value='2')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='BETACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='BETACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='EVAPLEVEL' and iv.value='3')  );insert into r_result(name) values('GAMMACOND');insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='1')  );
insert into r_result_val(value, result_id) select '2.1', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.1' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '2.5', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.5' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '2.9', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.9' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='4')  );insert into r_result_val(value, result_id) select '3.1', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.1' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='5')  );insert into r_result_val(value, result_id) select '3.8', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3.8' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='6')  );insert into r_result_val(value, result_id) select '4.2', r.id from r_result r where r.name='GAMMACOND'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4.2' and r.name='GAMMACOND' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='CONDFUNC' and iv.value='7')  );insert into r_result(name) values('IND_MU_MV');insert into r_result_val(value, result_id) select '23000', r.id from r_result r where r.name='IND_MU_MV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='23000' and r.name='IND_MU_MV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='1')  );insert into r_result_val(value, result_id) select '27000', r.id from r_result r where r.name='IND_MU_MV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='IND_MU_MV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='2')  );insert into r_result_val(value, result_id) select '12000', r.id from r_result r where r.name='IND_MU_MV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12000' and r.name='IND_MU_MV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='3')  );insert into r_result_val(value, result_id) select '15000', r.id from r_result r where r.name='IND_MU_MV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='IND_MU_MV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='4')  );insert into r_result_val(value, result_id) select '12000', r.id from r_result r where r.name='IND_MU_MV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12000' and r.name='IND_MU_MV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='5')  );insert into r_result(name) values('IND_MU_REG_FROID');insert into r_result_val(value, result_id) select '9900', r.id from r_result r where r.name='IND_MU_REG_FROID'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9900' and r.name='IND_MU_REG_FROID' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '9900', r.id from r_result r where r.name='IND_MU_REG_FROID'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9900' and r.name='IND_MU_REG_FROID' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '7600', r.id from r_result r where r.name='IND_MU_REG_FROID'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7600' and r.name='IND_MU_REG_FROID' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('FC_IND_REG_FROID');insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='FC_IND_REG_FROID'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='FC_IND_REG_FROID' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='EVAPLEVEL' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='FC_IND_REG_FROID'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='FC_IND_REG_FROID' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='EVAPLEVEL' and iv.value='2')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='FC_IND_REG_FROID'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='FC_IND_REG_FROID' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='EVAPLEVEL' and iv.value='3')  );insert into r_result(name) values('IND_MU_RS_VAP');insert into r_result_val(value, result_id) select '19330', r.id from r_result r where r.name='IND_MU_RS_VAP'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19330' and r.name='IND_MU_RS_VAP' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='1')  );insert into r_result_val(value, result_id) select '48330', r.id from r_result r where r.name='IND_MU_RS_VAP'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='48330' and r.name='IND_MU_RS_VAP' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='2')  );insert into r_result_val(value, result_id) select '77340', r.id from r_result r where r.name='IND_MU_RS_VAP'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='77340' and r.name='IND_MU_RS_VAP' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='3')  );insert into r_result(name) values('IND_MU_RS_EC');insert into r_result_val(value, result_id) select '3870', r.id from r_result r where r.name='IND_MU_RS_EC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3870' and r.name='IND_MU_RS_EC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='1')  );insert into r_result_val(value, result_id) select '9770', r.id from r_result r where r.name='IND_MU_RS_EC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9770' and r.name='IND_MU_RS_EC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='2')  );insert into r_result_val(value, result_id) select '15460', r.id from r_result r where r.name='IND_MU_RS_EC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15460' and r.name='IND_MU_RS_EC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='3')  );insert into r_result(name) values('IND_MU_RS_ESC');insert into r_result_val(value, result_id) select '9640', r.id from r_result r where r.name='IND_MU_RS_ESC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9640' and r.name='IND_MU_RS_ESC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='1')  );insert into r_result_val(value, result_id) select '24100', r.id from r_result r where r.name='IND_MU_RS_ESC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24100' and r.name='IND_MU_RS_ESC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='2')  );insert into r_result_val(value, result_id) select '38540', r.id from r_result r where r.name='IND_MU_RS_ESC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='38540' and r.name='IND_MU_RS_ESC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='3')  );insert into r_result(name) values('IND_MU_RS_FO');insert into r_result_val(value, result_id) select '18000', r.id from r_result r where r.name='IND_MU_RS_FO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='IND_MU_RS_FO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='1')  );insert into r_result_val(value, result_id) select '45050', r.id from r_result r where r.name='IND_MU_RS_FO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='45050' and r.name='IND_MU_RS_FO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='2')  );insert into r_result_val(value, result_id) select '72080', r.id from r_result r where r.name='IND_MU_RS_FO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='72080' and r.name='IND_MU_RS_FO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC2' and iv.value='3')  );insert into r_result(name) values('IND_MU_SECHEUR_AC');insert into r_result_val(value, result_id) select '2050', r.id from r_result r where r.name='IND_MU_SECHEUR_AC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2050' and r.name='IND_MU_SECHEUR_AC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '5100', r.id from r_result r where r.name='IND_MU_SECHEUR_AC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='IND_MU_SECHEUR_AC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '6300', r.id from r_result r where r.name='IND_MU_SECHEUR_AC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6300' and r.name='IND_MU_SECHEUR_AC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '8150', r.id from r_result r where r.name='IND_MU_SECHEUR_AC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='8150' and r.name='IND_MU_SECHEUR_AC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('IND_MU_SEQ_SIMPLE');insert into r_result_val(value, result_id) select '550', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='550' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='1')  );insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='2')  );insert into r_result_val(value, result_id) select '1650', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1650' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='3')  );insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='4')  );insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='5')  );insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='6')  );insert into r_result_val(value, result_id) select '3700', r.id from r_result r where r.name='IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3700' and r.name='IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='7')  );insert into r_result(name) values('IND_MU_SEQ_OPTION');insert into r_result_val(value, result_id) select '2500', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='1')  );insert into r_result_val(value, result_id) select '3050', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3050' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='2')  );insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='3')  );insert into r_result_val(value, result_id) select '4100', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='4')  );insert into r_result_val(value, result_id) select '4700', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='5')  );insert into r_result_val(value, result_id) select '5200', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5200' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='6')  );insert into r_result_val(value, result_id) select '5700', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5700' and r.name='IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='7')  );insert into r_result(name) values('P3_FC_SH_M');insert into r_result_val(value, result_id) select '0.3', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.3' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='4')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='6')  );insert into r_result_val(value, result_id) select '1.6', r.id from r_result r where r.name='P3_FC_SH_M'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.6' and r.name='P3_FC_SH_M' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='7')  );
insert into r_result(name) values('P3_FC_SH_M_2');insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='4')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='6')  );insert into r_result_val(value, result_id) select '1.6', r.id from r_result r where r.name='P3_FC_SH_M_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.6' and r.name='P3_FC_SH_M_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='7')  );insert into r_result(name) values('P3_FC_SH_A');insert into r_result_val(value, result_id) select '0.5', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.5' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.7', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.7' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='2')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.2', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.2' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.5', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.5' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.9', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.9' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='6')  );insert into r_result_val(value, result_id) select '2.5', r.id from r_result r where r.name='P3_FC_SH_A'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2.5' and r.name='P3_FC_SH_A' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SHCLASS' and iv.value='7')  );insert into r_result_val(value, result_id) select '9100', r.id from r_result r where r.name='P3_PROG_MU_A_C'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='P3_PROG_MU_A_C' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '7400', r.id from r_result r where r.name='P3_PROG_MU_A_C'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='7400' and r.name='P3_PROG_MU_A_C' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '4900', r.id from r_result r where r.name='P3_PROG_MU_A_C'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4900' and r.name='P3_PROG_MU_A_C' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('P3_CH_BOIS_MU');insert into r_result_val(value, result_id) select '29600', r.id from r_result r where r.name='P3_CH_BOIS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='29600' and r.name='P3_CH_BOIS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '24200', r.id from r_result r where r.name='P3_CH_BOIS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='24200' and r.name='P3_CH_BOIS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '16100', r.id from r_result r where r.name='P3_CH_BOIS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='16100' and r.name='P3_CH_BOIS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('P3_CH_BIO_MU');insert into r_result_val(value, result_id) select '142300', r.id from r_result r where r.name='P3_CH_BIO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='142300' and r.name='P3_CH_BIO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '116400', r.id from r_result r where r.name='P3_CH_BIO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='116400' and r.name='P3_CH_BIO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '77600', r.id from r_result r where r.name='P3_CH_BIO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='77600' and r.name='P3_CH_BIO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );insert into r_result(name) values('P3_FM_CH_SE');insert into r_result_val(value, result_id) select '1.01', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.01' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='1')  );insert into r_result_val(value, result_id) select '1.02', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.02' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='2')  );insert into r_result_val(value, result_id) select '1.05', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.05' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.06', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.06' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.08', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.08' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='5')  );insert into r_result_val(value, result_id) select '1.11', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.11' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='6')  );insert into r_result_val(value, result_id) select '1.12', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.12' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='7')  );insert into r_result_val(value, result_id) select '1.15', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.15' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='8')  );insert into r_result_val(value, result_id) select '1.17', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.17' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='9')  );insert into r_result_val(value, result_id) select '1.19', r.id from r_result r where r.name='P3_FM_CH_SE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.19' and r.name='P3_FM_CH_SE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SELENGTH' and iv.value='10')  );insert into r_result(name) values('P3_HYDRO_MU');insert into r_result_val(value, result_id) select '2100', r.id from r_result r where r.name='P3_HYDRO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2100' and r.name='P3_HYDRO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_HYDRO_TYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='P3_HYDRO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_HYDRO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_HYDRO_TYPE' and iv.value='2')  );insert into r_result_val(value, result_id) select '570', r.id from r_result r where r.name='P3_HYDRO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='570' and r.name='P3_HYDRO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_HYDRO_TYPE' and iv.value='3')  );insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='P3_HYDRO_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_HYDRO_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_HYDRO_TYPE' and iv.value='4')  );insert into r_result(name) values('P3_TER_FC_ISO');insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='P3_TER_FC_ISO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_TER_FC_ISO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='P3_TER_FC_ISO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_TER_FC_ISO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='P3_TER_FC_ISO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_TER_FC_ISO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='P3_TER_FC_ISO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_TER_FC_ISO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='P3_TER_FC_ISO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='P3_TER_FC_ISO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.6', r.id from r_result r where r.name='P3_TER_FC_ISO'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.6' and r.name='P3_TER_FC_ISO' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('P3_TER_FC_CH');insert into r_result_val(value, result_id) select '1.2', r.id from r_result r where r.name='P3_TER_FC_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.2' and r.name='P3_TER_FC_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='P3_TER_FC_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='P3_TER_FC_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '0..9', r.id from r_result r where r.name='P3_TER_FC_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0..9' and r.name='P3_TER_FC_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.4', r.id from r_result r where r.name='P3_TER_FC_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.4' and r.name='P3_TER_FC_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '1', r.id from r_result r where r.name='P3_TER_FC_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1' and r.name='P3_TER_FC_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.8', r.id from r_result r where r.name='P3_TER_FC_CH'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.8' and r.name='P3_TER_FC_CH' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('P3_TER_ROB_MU');insert into r_result_val(value, result_id) select '110', r.id from r_result r where r.name='P3_TER_ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='110' and r.name='P3_TER_ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='1')  );insert into r_result_val(value, result_id) select '94', r.id from r_result r where r.name='P3_TER_ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='94' and r.name='P3_TER_ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='2')  );insert into r_result_val(value, result_id) select '63', r.id from r_result r where r.name='P3_TER_ROB_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='63' and r.name='P3_TER_ROB_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='ZONE' and iv.value='3')  );
insert into r_result(name) values('P3_TER_MU_VEV');insert into r_result_val(value, result_id) select '14100', r.id from r_result r where r.name='P3_TER_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='14100' and r.name='P3_TER_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='1')  );insert into r_result_val(value, result_id) select '11300', r.id from r_result r where r.name='P3_TER_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='11300' and r.name='P3_TER_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='2')  );insert into r_result_val(value, result_id) select '4500', r.id from r_result r where r.name='P3_TER_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4500' and r.name='P3_TER_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='3')  );insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='P3_TER_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='4')  );insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='P3_TER_MU_VEV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_MU_VEV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_APPVEV' and iv.value='5')  );insert into r_result(name) values('P3_TER_FC_PAC');insert into r_result_val(value, result_id) select '1.2', r.id from r_result r where r.name='P3_TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.2' and r.name='P3_TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='1')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='P3_TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='P3_TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='2')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='P3_TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='P3_TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1.3', r.id from r_result r where r.name='P3_TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.3' and r.name='P3_TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='4')  );insert into r_result_val(value, result_id) select '1.1', r.id from r_result r where r.name='P3_TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1.1' and r.name='P3_TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='5')  );insert into r_result_val(value, result_id) select '0.9', r.id from r_result r where r.name='P3_TER_FC_PAC'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='P3_TER_FC_PAC' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='SEC' and iv.value='6')  );insert into r_result(name) values('P3_IND_VEV_MU');insert into r_result_val(value, result_id) select '18400', r.id from r_result r where r.name='P3_IND_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18400' and r.name='P3_IND_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='1')  );insert into r_result_val(value, result_id) select '12200', r.id from r_result r where r.name='P3_IND_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12200' and r.name='P3_IND_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='2')  );insert into r_result_val(value, result_id) select '9500', r.id from r_result r where r.name='P3_IND_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='P3_IND_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='3')  );insert into r_result_val(value, result_id) select '8200', r.id from r_result r where r.name='P3_IND_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='8200' and r.name='P3_IND_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='4')  );insert into r_result_val(value, result_id) select '6200', r.id from r_result r where r.name='P3_IND_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6200' and r.name='P3_IND_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='5')  );insert into r_result(name) values('P3_MVS_MU');insert into r_result_val(value, result_id) select '23900', r.id from r_result r where r.name='P3_MVS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='23900' and r.name='P3_MVS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='1')  );insert into r_result_val(value, result_id) select '15800', r.id from r_result r where r.name='P3_MVS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='15800' and r.name='P3_MVS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='2')  );insert into r_result_val(value, result_id) select '9500', r.id from r_result r where r.name='P3_MVS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='P3_MVS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='3')  );insert into r_result_val(value, result_id) select '12600', r.id from r_result r where r.name='P3_MVS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12600' and r.name='P3_MVS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='4')  );insert into r_result_val(value, result_id) select '9500', r.id from r_result r where r.name='P3_MVS_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='P3_MVS_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='APPENGINE' and iv.value='5')  );insert into r_result(name) values('P3_IND_MU_SEQ_SIMPLE');insert into r_result_val(value, result_id) select '560', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='560' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='1')  );insert into r_result_val(value, result_id) select '1100', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='2')  );insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='3')  );insert into r_result_val(value, result_id) select '2200', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2200' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='4')  );insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='5')  );insert into r_result_val(value, result_id) select '3200', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='6')  );insert into r_result_val(value, result_id) select '3700', r.id from r_result r where r.name='P3_IND_MU_SEQ_SIMPLE'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3700' and r.name='P3_IND_MU_SEQ_SIMPLE' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='7')  );insert into r_result(name) values('P3_IND_MU_SEQ_OPTION');insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='P3_IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='1')  );insert into r_result_val(value, result_id) select '3000', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='2')  );insert into r_result_val(value, result_id) select '3600', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='3')  );insert into r_result_val(value, result_id) select '4100', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4100' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='4')  );insert into r_result_val(value, result_id) select '4600', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4600' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='5')  );insert into r_result_val(value, result_id) select '5100', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='6')  );insert into r_result_val(value, result_id) select '5600', r.id from r_result r where r.name='IND_MU_SEQ_OPTION'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5600' and r.name='P3_IND_MU_SEQ_OPTION' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='NCOMP' and iv.value='7')  );insert into r_result(name) values('P3_IND_DESTRAT_MU_CONV');insert into r_result_val(value, result_id) select '1300', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_CONV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_IND_DESTRAT_MU_CONV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_CONV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_IND_DESTRAT_MU_CONV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '2900', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_CONV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_IND_DESTRAT_MU_CONV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '4000', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_CONV'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_IND_DESTRAT_MU_CONV' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('P3_IND_DESTRAT_MU_RAD');insert into r_result_val(value, result_id) select '470', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_RAD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_IND_DESTRAT_MU_RAD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '910', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_RAD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='910' and r.name='P3_IND_DESTRAT_MU_RAD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '1000', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_RAD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_IND_DESTRAT_MU_RAD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='P3_IND_DESTRAT_MU_RAD'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_IND_DESTRAT_MU_RAD' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('P3_IND_SECHEUR_MU');insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='P3_IND_SECHEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_IND_SECHEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '5000', r.id from r_result r where r.name='P3_IND_SECHEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='P3_IND_SECHEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '6800', r.id from r_result r where r.name='P3_IND_SECHEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='6800' and r.name='P3_IND_SECHEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '9500', r.id from r_result r where r.name='P3_IND_SECHEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9500' and r.name='P3_IND_SECHEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );
insert into r_result(name) values('P3_IND_RECUP_TOUR_MU');insert into r_result_val(value, result_id) select '12100', r.id from r_result r where r.name='P3_IND_RECUP_TOUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12100' and r.name='P3_IND_RECUP_TOUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '26700', r.id from r_result r where r.name='P3_IND_RECUP_TOUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='26700' and r.name='P3_IND_RECUP_TOUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '36400', r.id from r_result r where r.name='P3_IND_RECUP_TOUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='36400' and r.name='P3_IND_RECUP_TOUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '51000', r.id from r_result r where r.name='P3_IND_RECUP_TOUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='51000' and r.name='P3_IND_RECUP_TOUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('P3_IND_ECO_CHAUD_MU');insert into r_result_val(value, result_id) select '330', r.id from r_result r where r.name='P3_IND_ECO_CHAUD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_IND_ECO_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '720', r.id from r_result r where r.name='P3_IND_ECO_CHAUD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='720' and r.name='P3_IND_ECO_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '990', r.id from r_result r where r.name='P3_IND_ECO_CHAUD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='990' and r.name='P3_IND_ECO_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='P3_IND_ECO_CHAUD_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_IND_ECO_CHAUD_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('P3_IND_BRULEUR_MU');insert into r_result_val(value, result_id) select '550', r.id from r_result r where r.name='P3_IND_BRULEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='550' and r.name='P3_IND_BRULEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '1200', r.id from r_result r where r.name='P3_IND_BRULEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_IND_BRULEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='P3_IND_BRULEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_IND_BRULEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '2300', r.id from r_result r where r.name='P3_IND_BRULEUR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2300' and r.name='P3_IND_BRULEUR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='MFUNC' and iv.value='4')  );insert into r_result(name) values('P3_IND_RECUP_FROID_MU');insert into r_result_val(value, result_id) select '21500', r.id from r_result r where r.name='P3_IND_RECUP_FROID_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='21500' and r.name='P3_IND_RECUP_FROID_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_MFUNC' and iv.value='1')  );insert into r_result_val(value, result_id) select '43100', r.id from r_result r where r.name='P3_IND_RECUP_FROID_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='43100' and r.name='P3_IND_RECUP_FROID_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_MFUNC' and iv.value='2')  );insert into r_result_val(value, result_id) select '64600', r.id from r_result r where r.name='P3_IND_RECUP_FROID_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='64600' and r.name='P3_IND_RECUP_FROID_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_MFUNC' and iv.value='3')  );insert into r_result_val(value, result_id) select '90400', r.id from r_result r where r.name='P3_IND_RECUP_FROID_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='90400' and r.name='P3_IND_RECUP_FROID_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_MFUNC' and iv.value='4')  );insert into r_result(name) values('P3_AGRI_SC_MU');insert into r_result_val(value, result_id) select '83', r.id from r_result r where r.name='P3_AGRI_SC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='83' and r.name='P3_AGRI_SC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SERTYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '70', r.id from r_result r where r.name='P3_AGRI_SC_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='70' and r.name='P3_AGRI_SC_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SERTYPE' and iv.value='2')  );insert into r_result(name) values('P3_AGRI_SERRE_EQ_MU');insert into r_result_val(value, result_id) select '410', r.id from r_result r where r.name='P3_AGRI_SERRE_EQ_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_AGRI_SERRE_EQ_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SERTYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '280', r.id from r_result r where r.name='P3_AGRI_SERRE_EQ_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='280' and r.name='P3_AGRI_SERRE_EQ_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SERTYPE' and iv.value='2')  );insert into r_result(name) values('P3_AGRI_SERRE_EQ_MU_2');insert into r_result_val(value, result_id) select '42', r.id from r_result r where r.name='P3_AGRI_SERRE_EQ_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='42' and r.name='P3_AGRI_SERRE_EQ_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SERTYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '22', r.id from r_result r where r.name='P3_AGRI_SERRE_EQ_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='22' and r.name='P3_AGRI_SERRE_EQ_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_SERTYPE' and iv.value='2')  );insert into r_result(name) values('P3_VEV_MU');insert into r_result_val(value, result_id) select '2600', r.id from r_result r where r.name='P3_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2600' and r.name='P3_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='1')  );insert into r_result_val(value, result_id) select '31800', r.id from r_result r where r.name='P3_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='31800' and r.name='P3_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='2')  );insert into r_result_val(value, result_id) select '18700', r.id from r_result r where r.name='P3_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='18700' and r.name='P3_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='3')  );insert into r_result_val(value, result_id) select '4600', r.id from r_result r where r.name='P3_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4600' and r.name='P3_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='4')  );insert into r_result_val(value, result_id) select '12500', r.id from r_result r where r.name='P3_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12500' and r.name='P3_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='5')  );insert into r_result_val(value, result_id) select '3700', r.id from r_result r where r.name='P3_VEV_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3700' and r.name='P3_VEV_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_AGR_APPVEV' and iv.value='6')  );insert into r_result(name) values('P3_FORM_MU');insert into r_result_val(value, result_id) select '12400', r.id from r_result r where r.name='P3_FORM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='12400' and r.name='P3_FORM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_FORMTYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '9100', r.id from r_result r where r.name='P3_FORM_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='9100' and r.name='P3_FORM_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_FORMTYPE' and iv.value='2')  );insert into r_result(name) values('P3_FORM_MU_2');insert into r_result_val(value, result_id) select '2900', r.id from r_result r where r.name='P3_FORM_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2900' and r.name='P3_FORM_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_FORMTYPE2' and iv.value='1')  );insert into r_result_val(value, result_id) select '2400', r.id from r_result r where r.name='P3_FORM_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2400' and r.name='P3_FORM_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_FORMTYPE2' and iv.value='2')  );insert into r_result(name) values('P3_STATION_MU');insert into r_result_val(value, result_id) select '534200', r.id from r_result r where r.name='P3_STATION_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='534200' and r.name='P3_STATION_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_TYPESTA' and iv.value='1')  );insert into r_result_val(value, result_id) select '148400', r.id from r_result r where r.name='P3_STATION_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='148400' and r.name='P3_STATION_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_TYPESTA' and iv.value='2')  );insert into r_result_val(value, result_id) select '39600', r.id from r_result r where r.name='P3_STATION_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='39600' and r.name='P3_STATION_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_TYPESTA' and iv.value='3')  );insert into r_result(name) values('P3_CAR_MU');insert into r_result_val(value, result_id) select '4700', r.id from r_result r where r.name='P3_CAR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_CAR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '1700', r.id from r_result r where r.name='P3_CAR_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='P3_CAR_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='2')  );insert into r_result(name) values('P3_CAR_MU_2');insert into r_result_val(value, result_id) select '3900', r.id from r_result r where r.name='P3_CAR_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='3900' and r.name='P3_CAR_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='1')  );insert into r_result_val(value, result_id) select '1400', r.id from r_result r where r.name='P3_CAR_MU_2'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_CAR_MU_2' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARTYPE' and iv.value='2')  );insert into r_result(name) values('P3_CARCAT_MU');insert into r_result_val(value, result_id) select '1600', r.id from r_result r where r.name='P3_CARCAT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_CARCAT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='1')  );insert into r_result_val(value, result_id) select '2700', r.id from r_result r where r.name='P3_CARCAT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='2700' and r.name='P3_CARCAT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='2')  );insert into r_result_val(value, result_id) select '27000', r.id from r_result r where r.name='P3_CARCAT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='27000' and r.name='P3_CARCAT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='3')  );insert into r_result_val(value, result_id) select '19900', r.id from r_result r where r.name='P3_CARCAT_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='19900' and r.name='P3_CARCAT_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_CARCAT' and iv.value='4')  );insert into r_result(name) values('P3_ENGINE_MU');insert into r_result_val(value, result_id) select '4700', r.id from r_result r where r.name='P3_ENGINE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_ENGINE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='1')  );insert into r_result_val(value, result_id) select '4700', r.id from r_result r where r.name='P3_ENGINE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4700' and r.name='P3_ENGINE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='2')  );insert into r_result_val(value, result_id) select '4400', r.id from r_result r where r.name='P3_ENGINE_MU'; insert into r_value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from r_result_val _rv inner join r_result r on r.id=_rv.result_id where _rv.value ='4400' and r.name='P3_ENGINE_MU' and not exists   (select * from  r_value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join r_input_val iv inner join r_input i on i.id=iv.input_id where (  (i.name='P3_TYPE_ENGINE' and iv.value='3')  );
