insert into result_val(value, result_id) select '24500', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '20100', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '13400', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24500' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20100' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '32200', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '26400', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '17600', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32200' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17600' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '39700', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '32500', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '21700', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='39700' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32500' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21700' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into result_val(value, result_id) select '24500', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '20100', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '13400', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='24500' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20100' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '32200', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '26400', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '17600', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32200' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26400' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17600' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '39700', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '32500', r.id from result r where r.name='P3_PACE_MU_3';insert into result_val(value, result_id) select '21700', r.id from result r where r.name='P3_PACE_MU_3'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='39700' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32500' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21700' and r.name='P3_PACE_MU_3' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_ETASCLASS' and iv.value='3')  );insert into result(name) values('P3_PACA_MU');insert into result_val(value, result_id) select '90000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '74000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '49000', r.id from result r where r.name='P3_PACA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='90000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='74000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='49000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into result_val(value, result_id) select '93000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '76000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '51000', r.id from result r where r.name='P3_PACA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='93000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='76000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='51000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPACLASS' and iv.value='2')  ); insert into result_val(value, result_id) select '32000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '26000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '18000', r.id from result r where r.name='P3_PACA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into result_val(value, result_id) select '32000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '26000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '18000', r.id from result r where r.name='P3_PACA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into result_val(value, result_id) select '32000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '26000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '18000', r.id from result r where r.name='P3_PACA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPACLASS' and iv.value='1')  );insert into result_val(value, result_id) select '32000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '26000', r.id from result r where r.name='P3_PACA_MU';insert into result_val(value, result_id) select '18000', r.id from result r where r.name='P3_PACA_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='32000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18000' and r.name='P3_PACA_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_COPACLASS' and iv.value='2')  );insert into result(name) values('P3_COPECOL_MU_1');insert into result_val(value, result_id) select '71900', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '58900', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '39000', r.id from result r where r.name='P3_COPECOL_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='71900' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='58900' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='39000' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '106000', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '91700', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '68800', r.id from result r where r.name='P3_COPECOL_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='106000' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='91700' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='68800' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '91100', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '74600', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '49500', r.id from result r where r.name='P3_COPECOL_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='91100' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='74600' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='49500' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '134300', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '116200', r.id from result r where r.name='P3_COPECOL_MU_1';insert into result_val(value, result_id) select '87200', r.id from result r where r.name='P3_COPECOL_MU_1'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='134300' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='116200' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='87200' and r.name='P3_COPECOL_MU_1' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_COPECOL_MU_2');insert into result_val(value, result_id) select '46600', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '38200', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '25300', r.id from result r where r.name='P3_COPECOL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='46600' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='38200' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25300' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );
insert into result_val(value, result_id) select '68700', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '59400', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '44600', r.id from result r where r.name='P3_COPECOL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='68700' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='59400' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='44600' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '56400', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '46200', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '30600', r.id from result r where r.name='P3_COPECOL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='56400' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='46200' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='30600' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '83200', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '72000', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '54000', r.id from result r where r.name='P3_COPECOL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='83200' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='72000' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='54000' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_COPECOL_MU_2');insert into result_val(value, result_id) select '65800', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '53900', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '35700', r.id from result r where r.name='P3_COPECOL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='65800' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='53900' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='35700' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '96900', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '83900', r.id from result r where r.name='P3_COPECOL_MU_2';insert into result_val(value, result_id) select '62900', r.id from result r where r.name='P3_COPECOL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='96900' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='83900' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='62900' and r.name='P3_COPECOL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_TER_CH_COL_MU');insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '340', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '230', r.id from result r where r.name='P3_TER_CH_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='340' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '520', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '280', r.id from result r where r.name='P3_TER_CH_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='520' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='280' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '440', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '360', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_TER_CH_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='360' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '550', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '450', r.id from result r where r.name='P3_TER_CH_COL_MU';insert into result_val(value, result_id) select '300', r.id from result r where r.name='P3_TER_CH_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='450' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='300' and r.name='P3_TER_CH_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_POWERCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_TER_PAC_COL_MU');insert into result_val(value, result_id) select '820', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '670', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '450', r.id from result r where r.name='P3_TER_PAC_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='450' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '820', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '550', r.id from result r where r.name='P3_TER_PAC_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='820' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='550' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '850', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '560', r.id from result r where r.name='P3_TER_PAC_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='850' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='560' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_TER_PAC_COL_MU';insert into result_val(value, result_id) select '700', r.id from result r where r.name='P3_TER_PAC_COL_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='700' and r.name='P3_TER_PAC_COL_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );
insert into result(name) values('P3_TER_PAC_COL_MU_2');insert into result_val(value, result_id) select '530', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '430', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '290', r.id from result r where r.name='P3_TER_PAC_COL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='530' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='430' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='290' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '530', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '360', r.id from result r where r.name='P3_TER_PAC_COL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='530' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='360' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '640', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '520', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '350', r.id from result r where r.name='P3_TER_PAC_COL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='640' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='520' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='350' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '790', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '430', r.id from result r where r.name='P3_TER_PAC_COL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='790' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='430' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '750', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '610', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '410', r.id from result r where r.name='P3_TER_PAC_COL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='750' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '920', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '750', r.id from result r where r.name='P3_TER_PAC_COL_MU_2';insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_TER_PAC_COL_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='920' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='750' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_PAC_COL_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_TER_PAC_GAZ_AE_MU');insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '410', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '270', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='270' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '610', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '330', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '600', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '490', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '330', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='600' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='490' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='330' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '740', r.id from result r where r.name='P3_ETASCLASS';insert into result_val(value, result_id) select '610', r.id from result r where r.name='P3_ETASCLASS';insert into result_val(value, result_id) select '410', r.id from result r where r.name='P3_ETASCLASS'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='740' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='410' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '700', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '570', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU';insert into result_val(value, result_id) select '380', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='700' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='570' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='380' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '870', r.id from result r where r.name='P3_ETASCLASS';insert into result_val(value, result_id) select '710', r.id from result r where r.name='P3_ETASCLASS';insert into result_val(value, result_id) select '470', r.id from result r where r.name='P3_ETASCLASS'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='870' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='710' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='470' and r.name='P3_TER_PAC_GAZ_AE_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_ETASCLASS' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_TER_PAC_GAZ_AE_MU_2');
insert into result_val(value, result_id) select '770', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '630', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='630' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '950', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '770', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '520', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='950' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='770' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='520' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result_val(value, result_id) select '970', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '800', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '530', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='970' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='800' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='530' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='1')  );insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '980', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2';insert into result_val(value, result_id) select '650', r.id from result r where r.name='P3_TER_PAC_GAZ_AE_MU_2'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='980' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='CUSAGE' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='P3_TER_PAC_GAZ_AE_MU_2' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_COPECLASS' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='CUSAGE' and iv.value='2')  );insert into result(name) values('P3_TER_GEST_CHAUF_MU');insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '430', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='430' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='1')  ); insert into result_val(value, result_id) select '90', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='90' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='2')  ); insert into result_val(value, result_id) select '230', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '400', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='230' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='400' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='3')  ); insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='4')  ); insert into result_val(value, result_id) select '110', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '190', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='110' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='190' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='5')  ); insert into result_val(value, result_id) select '90', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='90' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='6')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='1')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='6')  );  
insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '440', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='440' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='1')  ); insert into result_val(value, result_id) select '100', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='2')  ); insert into result_val(value, result_id) select '250', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '420', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='250' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='420' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='3')  ); insert into result_val(value, result_id) select '200', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '500', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='200' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='500' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='4')  ); insert into result_val(value, result_id) select '140', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='140' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='5')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='5')  ); insert into result_val(value, result_id) select '100', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_TER_GEST_CHAUF_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='100' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='1')   or (i.name='SEC' and iv.value='6')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_TER_GEST_CHAUF_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='CUSAGE' and iv.value='2')  or   (i.name='ENER' and iv.value='2')   or (i.name='SEC' and iv.value='6')  );  insert into result(name) values('TUBE_LED_MU');    insert into result_val(value, result_id) select '780', r.id from result r where r.name='TUBE_LED_MU';insert into result_val(value, result_id) select '650', r.id from result r where r.name='TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='780' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='1')  or   (i.name='P3_BALAST' and iv.value='1')   or (i.name='P3_LIEU_INSTALL' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='650' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='1')  or   (i.name='P3_BALAST' and iv.value='2')   or (i.name='P3_LIEU_INSTALL' and iv.value='1')  );insert into result_val(value, result_id) select '750', r.id from result r where r.name='TUBE_LED_MU';insert into result_val(value, result_id) select '620', r.id from result r where r.name='TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='750' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='1')  or   (i.name='P3_BALAST' and iv.value='1')   or (i.name='P3_LIEU_INSTALL' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='620' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='1')  or   (i.name='P3_BALAST' and iv.value='2')   or (i.name='P3_LIEU_INSTALL' and iv.value='2')  ); insert into result_val(value, result_id) select '830', r.id from result r where r.name='TUBE_LED_MU';insert into result_val(value, result_id) select '680', r.id from result r where r.name='TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='830' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='1')  or   (i.name='P3_BALAST' and iv.value='1')   or (i.name='P3_LIEU_INSTALL' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='680' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='1')  or   (i.name='P3_BALAST' and iv.value='2')   or (i.name='P3_LIEU_INSTALL' and iv.value='3')  );      insert into result_val(value, result_id) select '1300', r.id from result r where r.name='TUBE_LED_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='2')  or   (i.name='P3_BALAST' and iv.value='1')   or (i.name='P3_LIEU_INSTALL' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='2')  or   (i.name='P3_BALAST' and iv.value='2')   or (i.name='P3_LIEU_INSTALL' and iv.value='1')  ); insert into result_val(value, result_id) select '1200', r.id from result r where r.name='TUBE_LED_MU';insert into result_val(value, result_id) select '1000', r.id from result r where r.name='TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='2')  or   (i.name='P3_BALAST' and iv.value='1')   or (i.name='P3_LIEU_INSTALL' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='2')  or   (i.name='P3_BALAST' and iv.value='2')   or (i.name='P3_LIEU_INSTALL' and iv.value='2')  ); insert into result_val(value, result_id) select '1400', r.id from result r where r.name='TUBE_LED_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='TUBE_LED_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='2')  or   (i.name='P3_BALAST' and iv.value='1')   or (i.name='P3_LIEU_INSTALL' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='TUBE_LED_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LONG_TUBE' and iv.value='2')  or   (i.name='P3_BALAST' and iv.value='2')   or (i.name='P3_LIEU_INSTALL' and iv.value='3')  ); insert into result(name) values('P3_TER_DESTRA_SPORT_MU');insert into result_val(value, result_id) select '1500', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '3200', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1500' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3200' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '4000', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '5100', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '7100', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4000' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5100' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='7100' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '530', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '710', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='530' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='710' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '1400', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU';insert into result_val(value, result_id) select '2500', r.id from result r where r.name='P3_TER_DESTRA_SPORT_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2500' and r.name='P3_TER_DESTRA_SPORT_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into result(name) values('P3_TER_DESTRA_SPEC_MU');insert into result_val(value, result_id) select '1100', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '1300', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1300' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '3000', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '3600', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '4500', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3000' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='3600' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='4500' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into result_val(value, result_id) select '370', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '460', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '610', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='370' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='460' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='610' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='1')  );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '1200', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_TER_DESTRA_SPEC_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1200' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_TER_DESTRA_SPEC_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_DESTRAT_TYPE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='HLOCCLASS' and iv.value='2')  );insert into result(name) values('P3_CLIM_SCOND_MU');
insert into result_val(value, result_id) select '2000', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '1800', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '1600', r.id from result r where r.name='P3_CLIM_SCOND_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='2000' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_TYEP_CLIM' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1800' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_TYEP_CLIM' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1600' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_TYEP_CLIM' and iv.value='1')  );insert into result_val(value, result_id) select '22800', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '20500', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '20200', r.id from result r where r.name='P3_CLIM_SCOND_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='22800' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_TYEP_CLIM' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20500' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_TYEP_CLIM' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='20200' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_TYEP_CLIM' and iv.value='2')  );insert into result_val(value, result_id) select '19100', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '17000', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '16400', r.id from result r where r.name='P3_CLIM_SCOND_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19100' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_TYEP_CLIM' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='17000' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_TYEP_CLIM' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='16400' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_TYEP_CLIM' and iv.value='3')  );insert into result_val(value, result_id) select '670', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '480', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '290', r.id from result r where r.name='P3_CLIM_SCOND_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='670' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_TYEP_CLIM' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='480' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_TYEP_CLIM' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='290' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_TYEP_CLIM' and iv.value='1')  );insert into result_val(value, result_id) select '14500', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '13900', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '11300', r.id from result r where r.name='P3_CLIM_SCOND_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='14500' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_TYEP_CLIM' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13900' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_TYEP_CLIM' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='11300' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_TYEP_CLIM' and iv.value='2')  );insert into result_val(value, result_id) select '13400', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '12800', r.id from result r where r.name='P3_CLIM_SCOND_MU';insert into result_val(value, result_id) select '10500', r.id from result r where r.name='P3_CLIM_SCOND_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='13400' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='P3_TYEP_CLIM' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12800' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='P3_TYEP_CLIM' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10500' and r.name='P3_CLIM_SCOND_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='SCOND' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='P3_TYEP_CLIM' and iv.value='3')  ); insert into result(name) values('P3_IND_RECUP_MU');insert into result_val(value, result_id) select '6400', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '6000', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '5000', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6400' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='6000' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='5000' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='1')  );insert into result_val(value, result_id) select '15900', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '15000', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '12600', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15900' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15000' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='12600' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='2')  );insert into result_val(value, result_id) select '19700', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '18600', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '15600', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='19700' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='18600' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='15600' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='3')  );insert into result_val(value, result_id) select '26700', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '25200', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '21100', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='26700' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25200' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='21100' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='4')  );insert into result_val(value, result_id) select '10300', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '10300', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '10300', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10300' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10300' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='10300' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='1')  );insert into result_val(value, result_id) select '25600', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '25600', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '25600', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25600' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25600' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='25600' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='2')  );insert into result_val(value, result_id) select '31800', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '31800', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '31800', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='31800' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='31800' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='31800' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='3')  );insert into result_val(value, result_id) select '43100', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '43100', r.id from result r where r.name='P3_IND_RECUP_MU';insert into result_val(value, result_id) select '43100', r.id from result r where r.name='P3_IND_RECUP_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43100' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='MFUNC' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43100' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='MFUNC' and iv.value='4')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='43100' and r.name='P3_IND_RECUP_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_HEAT_USE' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='MFUNC' and iv.value='4')  );insert into result(name) values('RADIATEUR_MU');
insert into result_val(value, result_id) select '1700', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '910', r.id from result r where r.name='RADIATEUR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='910' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1700', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '1400', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '910', r.id from result r where r.name='RADIATEUR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1700' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1400' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='910' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  ); insert into result_val(value, result_id) select '1100', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '880', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '590', r.id from result r where r.name='RADIATEUR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='590' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '850', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '560', r.id from result r where r.name='RADIATEUR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='850' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='560' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );insert into result_val(value, result_id) select '1100', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '880', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '590', r.id from result r where r.name='RADIATEUR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1100' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='880' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='590' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='1')  );insert into result_val(value, result_id) select '1000', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '850', r.id from result r where r.name='RADIATEUR_MU';insert into result_val(value, result_id) select '560', r.id from result r where r.name='RADIATEUR_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1000' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='1')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='850' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='2')   or (i.name='TCH' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='560' and r.name='RADIATEUR_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='ZONE' and iv.value='3')   or (i.name='TCH' and iv.value='2')  );  insert into result(name) values('FACTEUR_R');    insert into result_val(value, result_id) select '0.9', r.id from result r where r.name='FACTEUR_R';insert into result_val(value, result_id) select '1', r.id from result r where r.name='FACTEUR_R';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='HYG' and iv.value='1')   or (i.name='TYPE_CAISSON' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='HYG' and iv.value='2')   or (i.name='TYPE_CAISSON' and iv.value='1')  );insert into result_val(value, result_id) select '0', r.id from result r where r.name='FACTEUR_R';insert into result_val(value, result_id) select '0', r.id from result r where r.name='FACTEUR_R';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='HYG' and iv.value='1')   or (i.name='TYPE_CAISSON' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='1')  or   (i.name='HYG' and iv.value='2')   or (i.name='TYPE_CAISSON' and iv.value='2')  );            insert into result_val(value, result_id) select '0.9', r.id from result r where r.name='FACTEUR_R';insert into result_val(value, result_id) select '1', r.id from result r where r.name='FACTEUR_R';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='HYG' and iv.value='1')   or (i.name='TYPE_CAISSON' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='HYG' and iv.value='2')   or (i.name='TYPE_CAISSON' and iv.value='1')  );insert into result_val(value, result_id) select '0.85', r.id from result r where r.name='FACTEUR_R';insert into result_val(value, result_id) select '0.95', r.id from result r where r.name='FACTEUR_R';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.85' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='HYG' and iv.value='1')   or (i.name='TYPE_CAISSON' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.95' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='2')  or   (i.name='HYG' and iv.value='2')   or (i.name='TYPE_CAISSON' and iv.value='2')  );            insert into result_val(value, result_id) select '0.9', r.id from result r where r.name='FACTEUR_R';insert into result_val(value, result_id) select '1', r.id from result r where r.name='FACTEUR_R';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.9' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='HYG' and iv.value='1')   or (i.name='TYPE_CAISSON' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='1' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='HYG' and iv.value='2')   or (i.name='TYPE_CAISSON' and iv.value='1')  );insert into result_val(value, result_id) select '0.85', r.id from result r where r.name='FACTEUR_R';insert into result_val(value, result_id) select '0.95', r.id from result r where r.name='FACTEUR_R';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.85' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='HYG' and iv.value='1')   or (i.name='TYPE_CAISSON' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='0.95' and r.name='FACTEUR_R' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='LOG' and iv.value='3')  or   (i.name='HYG' and iv.value='2')   or (i.name='TYPE_CAISSON' and iv.value='2')  );insert into result(name) values('P3_RES_ISOM_LOG_MU');insert into result_val(value, result_id) select '200', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='200' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='1')  or   (i.name='P3_RT' and iv.value='1')   or (i.name='LOG' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='1')  or   (i.name='P3_RT' and iv.value='2')   or (i.name='LOG' and iv.value='1')  );insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';insert into result_val(value, result_id) select '280', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='1')  or   (i.name='P3_RT' and iv.value='1')   or (i.name='LOG' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='280' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='1')  or   (i.name='P3_RT' and iv.value='2')   or (i.name='LOG' and iv.value='2')  );insert into result_val(value, result_id) select '240', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';insert into result_val(value, result_id) select '280', r.id from result r where r.name='P3_RES_ISOM_LOG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='240' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='1')  or   (i.name='P3_RT' and iv.value='1')   or (i.name='LOG' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='280' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='1')  or   (i.name='P3_RT' and iv.value='2')   or (i.name='LOG' and iv.value='3')  );insert into result_val(value, result_id) select '130', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';insert into result_val(value, result_id) select '150', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='130' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='2')  or   (i.name='P3_RT' and iv.value='1')   or (i.name='LOG' and iv.value='1')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='150' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='2')  or   (i.name='P3_RT' and iv.value='2')   or (i.name='LOG' and iv.value='1')  );insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';  insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='2')  or   (i.name='P3_RT' and iv.value='1')   or (i.name='LOG' and iv.value='2')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='2')  or   (i.name='P3_RT' and iv.value='2')   or (i.name='LOG' and iv.value='2')  );insert into result_val(value, result_id) select '160', r.id from result r where r.name='P3_RES_ISOM_LOG_MU';insert into result_val(value, result_id) select '180', r.id from result r where r.name='P3_RES_ISOM_LOG_MU'; insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='160' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='2')  or   (i.name='P3_RT' and iv.value='1')   or (i.name='LOG' and iv.value='3')  );insert into value_assoc(resultval_id, inputval_id) select rv.id, iv.id from (select _rv.* from result_val _rv inner join result r on r.id=_rv.result_id where _rv.value ='180' and r.name='P3_RES_ISOM_LOG_MU' and not exists   (select * from  value_assoc va where va.resultval_id=_rv.id) limit 0,1) as rv inner join input_val iv inner join input i on i.id=iv.input_id where (     (i.name='P3_LOG' and iv.value='2')  or   (i.name='P3_RT' and iv.value='2')   or (i.name='LOG' and iv.value='3')  );
insert into input(name) values('ASH_quotation_date');insert into input(name) values('ASH_invoice_edition_date');insert into input(name) values('ASH_invoice_number');insert into input(name) values('ASH_work_site');insert into input(name) values('ASH_address');insert into input(name) values('ASH_address_complement');insert into input(name) values('ASH_zipcode');insert into input(name) values('ASH_city');insert into input(name) values('ASH_ACFLAG');insert into input_val(value, input_id, title) select '2', i.id, 'Oui' from input i where i.name='ASH_ACFLAG';insert into input_val(value, input_id, title) select '1', i.id, 'Non' from input i where i.name='ASH_ACFLAG';insert into input(name) values('ASH_ENR');insert into input_val(value, input_id, title) select '1', i.id, 'Électricité' from input i where i.name='ASH_ENR';insert into input_val(value, input_id, title) select '2', i.id, 'Combustible (gaz, fioul, bois)' from input i where i.name='ASH_ENR';insert into input(name) values('ASH_PRO2_LAST_NAME');insert into input(name) values('ASH_PRO2_FIRST_NAME');insert into input(name) values('ASH_PRO2_SOCIAL_NAME');insert into input(name) values('ASH_PRO2_SIRET');insert into input(name) values('ASH_USER_LAST_NAME');insert into input(name) values('ASH_USER_FIRST_NAME');insert into input(name) values('ASH_USER_SOCIAL_NAME');insert into input(name) values('ASH_USER_FUNCTION');insert into input(name) values('ASH_USER_SIREN');insert into input(name) values('ASH_USER_NO_SIREN');insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_USER_NO_SIREN';insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_USER_NO_SIREN';insert into input(name) values('ASH_USER_ADDRESS');insert into input(name) values('ASH_USER_ADDRESS_COMPLEMENT');insert into input(name) values('ASH_USER_ZIPCODE');insert into input(name) values('ASH_USER_CITY');insert into input(name) values('ASH_USER_COUNTRY');insert into input(name) values('ASH_USER_TELEPHONE');insert into input(name) values('ASH_USER_MOBILE');insert into input(name) values('ASH_USER_EMAIL');insert into input(name) values('ASH_OWNER');insert into input_val(value, input_id, title) select '1', i.id, 'Le propriétaire' from input i where i.name='ASH_OWNER';insert into input_val(value, input_id, title) select '2', i.id, 'Le maître d\'ouvrage de l\'installation' from input i where i.name='ASH_OWNER';insert into input(name) values('ASH_USER_EDITION_DATE');insert into input(name) values('ASH_PRO_LAST_NAME');insert into input(name) values('ASH_PRO_FIRST_NAME');insert into input(name) values('ASH_PRO_FUNCTION');insert into input(name) values('ASH_PRO_SOCIAL_NAME');insert into input(name) values('ASH_PRO_SIRET');insert into input(name) values('ASH_PRO_ADDRESS');insert into input(name) values('ASH_PRO_ZIPCODE');insert into input(name) values('ASH_PRO_CITY');insert into input(name) values('ASH_PRO_TELEPHONE');insert into input(name) values('ASH_PRO_MOBILE');insert into input(name) values('ASH_PRO_EMAIL');insert into input(name) values('ASH_PRO_MOA');insert into input_val(value, input_id, title) select '1', i.id, 'Ayant fait la mise en œuvre' from input i where i.name='ASH_PRO_MOA';insert into input_val(value, input_id, title) select '2', i.id, 'Ayant assuré la maîtrise d\'œuvre' from input i where i.name='ASH_PRO_MOA';insert into input(name) values('ASH_PRO_EDITION_DATE');insert into input(name) values('ASH_BRAND');insert into input(name) values('ASH_REF');insert into input(name) values('ASH_pose_type');insert into input_val(value, input_id, title) select '1', i.id, 'en combles perdus' from input i where i.name='ASH_pose_type';insert into input_val(value, input_id, title) select '2', i.id, 'en rampants de toitures' from input i where i.name='ASH_pose_type';insert into input(name) values('ASH_SISOC');insert into input(name) values('ASH_RTH');insert into input(name) values('ASH_E');insert into input(name) values('ASH_SISOM');insert into input(name) values('ASH_SISOT');insert into input(name) values('ASH_SISOP');insert into input(name) values('ASH_FEN');insert into input(name) values('ASH_P3_COPE');insert into input(name) values('ASH_LOG');insert into input_val(value, input_id, title) select '1', i.id, 'Maison' from input i where i.name='ASH_LOG';insert into input_val(value, input_id, title) select '2', i.id, 'Appartement' from input i where i.name='ASH_LOG';insert into input_val(value, input_id, title) select '3', i.id, 'Immeuble Collectif' from input i where i.name='ASH_LOG';insert into input(name) values('ASH_SH');insert into input(name) values('ASH_ROB');insert into input(name) values('ASH_TCH');insert into input_val(value, input_id, title) select '1', i.id, 'Chauffage individuel' from input i where i.name='ASH_TCH';insert into input_val(value, input_id, title) select '2', i.id, 'Chauffage collectif' from input i where i.name='ASH_TCH';insert into input(name) values('ASH_P3_SCHAUF');insert into input(name) values('ASH_NAPP');insert into input(name) values('ASH_P3_COPA');insert into input(name) values('ASH_TYPE_FEN');insert into input_val(value, input_id, title) select '1', i.id, 'fenêtre(s) de toiture' from input i where i.name='ASH_TYPE_FEN';insert into input_val(value, input_id, title) select '2', i.id, 'autre(s) fenêtre(s) ou porte(s)-fenêtre(s)' from input i where i.name='ASH_TYPE_FEN';insert into input(name) values('ASH_UW');insert into input(name) values('ASH_SW');insert into input(name) values('ASH_CH_COND');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CH_COND';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CH_COND';insert into input(name) values('ASH_PERF_BOIS');insert into input_val(value, input_id, title) select '1', i.id, 'Label flamme verte' from input i where i.name='ASH_PERF_BOIS';insert into input_val(value, input_id, title) select '2', i.id, 'Le rendement énergétique « ɳ » de l\'équipement est supérieur ou égal à 70% et la concentration en monoxyde de carbone « E » mesurée à 13 % d\'O2 est inférieure ou égale à 0,3% (mesurés selon une des normes suivantes : NF EN 13240ou NF EN 14785 ou EN 15250 ; NF EN 13229; NF EN 12815)' from input i where i.name='ASH_PERF_BOIS';insert into input(name) values('ASH_ID_PERF');insert into input(name) values('ASH_CAR_BIOM');insert into input_val(value, input_id, title) select '1', i.id, 'Label flamme verte' from input i where i.name='ASH_CAR_BIOM';insert into input_val(value, input_id, title) select '2', i.id, 'Classe 5 selon la norme NF EN 303.5' from input i where i.name='ASH_CAR_BIOM';insert into input(name) values('ASH_ROB_RAD');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_ROB_RAD';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_ROB_RAD';insert into input(name) values('ASH_ROB_CHAUD');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_ROB_CHAUD';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_ROB_CHAUD';insert into input(name) values('ASH_ROB_NB');insert into input(name) values('ASH_REG_EQ');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_REG_EQ';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_REG_EQ';insert into input(name) values('ASH_MODE_CHAUF');insert into input_val(value, input_id, title) select '1', i.id, 'Chauffage individuel' from input i where i.name='ASH_MODE_CHAUF';insert into input_val(value, input_id, title) select '2', i.id, 'Chauffage collectif' from input i where i.name='ASH_MODE_CHAUF';insert into input(name) values('ASH_PROG_NB_APPT');insert into input(name) values('ASH_PROG_SURFACE');insert into input(name) values('ASH_SURFACE_CHAUF');insert into input(name) values('INV_UW');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_UW';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_UW';insert into input(name) values('INV_SW');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_SW';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_SW';insert into input(name) values('INV_Uw_Val');insert into input(name) values('INV_Sw_Val');insert into input(name) values('INV_BRAND');insert into input(name) values('INV_REF');insert into input(name) values('INV_NB_EQ');insert into input(name) values('INV_ADRESSE');insert into input(name) values('INV_ZIPCODE');insert into input(name) values('INV_CITY');insert into input(name) values('INV_ADRESSE_PRO');insert into input(name) values('INV_ZIPCODE_PRO');insert into input(name) values('INV_CITY_PRO');insert into input(name) values('INV_SIRET');insert into input(name) values('INV_DATE_RGE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_DATE_RGE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_DATE_RGE';insert into input(name) values('INV_NOM');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_NOM';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_NOM';insert into input(name) values('INV_CEE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_CEE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_CEE';insert into input(name) values('INV_OPERATION');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_OPERATION';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_OPERATION';insert into input(name) values('ASH_CONTROL_ADDRESS');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_ADDRESS';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_ADDRESS';insert into input(name) values('ASH_CONTROL_ADDRESS_PRO');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_ADDRESS_PRO';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_ADDRESS_PRO';insert into input(name) values('ASH_CONTROL_EQUIP');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_EQUIP';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_EQUIP';insert into input(name) values('ASH_CONTROL_USER_SIGNATURE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_USER_SIGNATURE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_USER_SIGNATURE';insert into input(name) values('ASH_CONTROL_PRO_SIGNATURE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_PRO_SIGNATURE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_PRO_SIGNATURE';insert into input(name) values('ASH_CONTROL_USER_TAMPON');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_USER_TAMPON';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_USER_TAMPON';insert into input(name) values('ASH_CONTROL_PRO_TAMPON');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_PRO_TAMPON';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_PRO_TAMPON';insert into input(name) values('ASH_CONTROL_ORIGINAL');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_ORIGINAL';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_ORIGINAL';insert into input(name) values('ASH_CONTROL_VIEW');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_VIEW';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_VIEW';insert into input(name) values('ASH_NOTE');insert into input(name) values('INV_SURFACE_ISO');insert into input(name) values('INV_RTH_ISO');insert into input(name) values('INV_COPE');insert into input(name) values('INV_LABEL_FV');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_LABEL_FV';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_LABEL_FV';insert into input(name) values('INV_REND_ENR');insert into input(name) values('INV_CO');insert into input(name) values('INV_SIGNE_QLT');insert into input_val(value, input_id, title) select '2', i.id, 'Classe 5' from input i where i.name='INV_SIGNE_QLT';insert into input_val(value, input_id, title) select '1', i.id, 'Label Flamme Verte' from input i where i.name='INV_SIGNE_QLT';insert into input(name) values('INV_SCOP');insert into input(name) values('ASH_TYPE_INS');insert into input_val(value, input_id, title) select '1', i.id, 'Sur air extrait' from input i where i.name='ASH_TYPE_INS';insert into input_val(value, input_id, title) select '2', i.id, 'Autres types d’installations' from input i where i.name='ASH_TYPE_INS';insert into input(name) values('ASH_COP_THERMO');insert into input(name) values('INV_COP_THERMO');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_COP_THERMO';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_COP_THERMO';insert into input(name) values('ASH_ABSENTE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_ABSENTE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_ABSENTE';insert into input(name) values('INV_ABSENTE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_ABSENTE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_ABSENTE';insert into input(name) values('INV_NUMBER');insert into input(name) values('INV_DATE');insert into input(name) values('INV_SOCIAL_NAME');insert into input(name) values('INSEE_COOR_PRO');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INSEE_COOR_PRO';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INSEE_COOR_PRO';insert into input(name) values('INV_DATE_ACOMPTE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_DATE_ACOMPTE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_DATE_ACOMPTE';insert into input(name) values('ASH_ETAS');insert into input(name) values('ASH_TYPE_PAC');insert into input_val(value, input_id, title) select '0', i.id, 'basse température' from input i where i.name='ASH_TYPE_PAC';insert into input_val(value, input_id, title) select '1', i.id, 'moyenne ou haute température' from input i where i.name='ASH_TYPE_PAC';insert into input(name) values('INV_ETAS');insert into input(name) values('INV_TYPE_PAC');insert into input_val(value, input_id, title) select '0', i.id, 'basse température' from input i where i.name='INV_TYPE_PAC';insert into input_val(value, input_id, title) select '1', i.id, 'moyenne ou haute température' from input i where i.name='INV_TYPE_PAC';insert into input(name) values('ASH_ETASCLASS');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_ETASCLASS';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_ETASCLASS';insert into input(name) values('INV_E');insert into input(name) values('INV_CONTROLE_CERTIF');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_CONTROLE_CERTIF';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_CONTROLE_CERTIF';insert into input(name) values('ASH_TYPE_INSTALL');insert into input_val(value, input_id, title) select '1', i.id, ' Individuelle autoréglable ' from input i where i.name='ASH_TYPE_INSTALL';insert into input_val(value, input_id, title) select '2', i.id, 'Individuelle modulée' from input i where i.name='ASH_TYPE_INSTALL';insert into input_val(value, input_id, title) select '3', i.id, 'Collective autoréglable' from input i where i.name='ASH_TYPE_INSTALL';insert into input(name) values('ASH_EFFICACITE');insert into input(name) values('ASH_BRAND_BOUCHES_EXTRACTION');insert into input(name) values('ASH_REF_BOUCHES_EXTRACTION');insert into input(name) values('INV_EFFICACITE');insert into input(name) values('INV_BRAND_BOUCHES_EXTRACTION');insert into input(name) values('INV_REF_BOUCHES_EXTRACTION');insert into input(name) values('INV_TYPE_INSTALL');insert into input_val(value, input_id, title) select '1', i.id, ' Individuelle autoréglable ' from input i where i.name='INV_TYPE_INSTALL';insert into input_val(value, input_id, title) select '2', i.id, 'Individuelle modulée' from input i where i.name='INV_TYPE_INSTALL';insert into input_val(value, input_id, title) select '3', i.id, 'Collective autoréglable' from input i where i.name='INV_TYPE_INSTALL';insert into input(name) values('ASH_HYG');insert into input_val(value, input_id, title) select '1', i.id, 'Type A : seules les bouches d’extraction sont hygroréglables' from input i where i.name='ASH_HYG';insert into input_val(value, input_id, title) select '2', i.id, 'Type B : les bouches d’extraction et les entrées d’air sont hygroréglables' from input i where i.name='ASH_HYG';insert into input(name) values('ASH_TYPE_CAISSON');insert into input_val(value, input_id, title) select '1', i.id, 'Basse consommation' from input i where i.name='ASH_TYPE_CAISSON';insert into input_val(value, input_id, title) select '2', i.id, 'Standard' from input i where i.name='ASH_TYPE_CAISSON';insert into input(name) values('ASH_VMC_PUISSANCE_IND');insert into input(name) values('ASH_VMC_PUISSANCE_COL');insert into input(name) values('INV_BRAND_BOUCHES_ENTREE_AIR');insert into input(name) values('INV_REF_BOUCHES_ENTREE_AIR');insert into input(name) values('ASH_BRAND_BOUCHES_ENTREE_AIR');insert into input(name) values('ASH_REF_BOUCHES_ENTREE_AIR');insert into input(name) values('INV_HYG');insert into input_val(value, input_id, title) select '1', i.id, 'Type A : seules les bouches d’extraction sont hygroréglables' from input i where i.name='INV_HYG';insert into input_val(value, input_id, title) select '2', i.id, 'Type B : les bouches d’extraction et les entrées d’air sont hygroréglables' from input i where i.name='INV_HYG';insert into input(name) values('INV_VMC_PUISSANCE');insert into input(name) values('INV_TYPE_CAISSON');insert into input_val(value, input_id, title) select '1', i.id, 'Basse consommation' from input i where i.name='INV_TYPE_CAISSON';insert into input_val(value, input_id, title) select '2', i.id, 'Standard' from input i where i.name='INV_TYPE_CAISSON';insert into input(name) values('INV_PRO_MOA');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_PRO_MOA';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_PRO_MOA';insert into input(name) values('PRECA_ASH_PAGE4_ABSENTE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='PRECA_ASH_PAGE4_ABSENTE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='PRECA_ASH_PAGE4_ABSENTE';insert into input(name) values('PRECA_CONTROL_SIGNATURE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='PRECA_CONTROL_SIGNATURE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='PRECA_CONTROL_SIGNATURE';insert into input(name) values('PRECA_ASH_EDITION_DATE');insert into input(name) values('PRECA_REVENU');insert into input_val(value, input_id, title) select '0', i.id, 'Dernier avis d\'imposition ou de non-imposition sur le revenu disponible' from input i where i.name='PRECA_REVENU';insert into input_val(value, input_id, title) select '1', i.id, 'Dernier justificatif d\'impôt sur le revenu disponible' from input i where i.name='PRECA_REVENU';insert into input_val(value, input_id, title) select '2', i.id, 'Facture d\'énergie (Electricité ou Gaz Naturel) justifiant d\'un tarif social datée de moins de 6 mois ' from input i where i.name='PRECA_REVENU';insert into input_val(value, input_id, title) select '3', i.id, 'Absent' from input i where i.name='PRECA_REVENU';insert into input(name) values('PRECA_CONTROL_NAME');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='PRECA_CONTROL_NAME';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='PRECA_CONTROL_NAME';insert into input(name) values('PRECA_CONTROL_ADDRESS');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='PRECA_CONTROL_ADDRESS';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='PRECA_CONTROL_ADDRESS';insert into input(name) values('PRECA_CONTROL_NB_PERSONNE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='PRECA_CONTROL_NB_PERSONNE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='PRECA_CONTROL_NB_PERSONNE';insert into input(name) values('PRECA_CONTROL_NB_FOYERS');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='PRECA_CONTROL_NB_FOYERS';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='PRECA_CONTROL_NB_FOYERS';insert into input(name) values('ASH_CONTROL_CADRE_A');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_CONTROL_CADRE_A';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_CONTROL_CADRE_A';insert into input(name) values('ASH_PUISS_TH_NOMINALE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_PUISS_TH_NOMINALE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_PUISS_TH_NOMINALE';insert into input(name) values('ASH_BRAND_REGUL');insert into input(name) values('ASH_REF_REGUL');insert into input(name) values('ASH_REGUL_CLASS');insert into input_val(value, input_id, title) select '1', i.id, 'I' from input i where i.name='ASH_REGUL_CLASS';insert into input_val(value, input_id, title) select '2', i.id, 'II' from input i where i.name='ASH_REGUL_CLASS';insert into input_val(value, input_id, title) select '3', i.id, 'III' from input i where i.name='ASH_REGUL_CLASS';insert into input_val(value, input_id, title) select '4', i.id, 'IV' from input i where i.name='ASH_REGUL_CLASS';insert into input_val(value, input_id, title) select '5', i.id, 'V' from input i where i.name='ASH_REGUL_CLASS';insert into input(name) values('INV_BRAND_REGUL');insert into input(name) values('INV_REF_REGUL');insert into input(name) values('INV_REGUL');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='INV_REGUL';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='INV_REGUL';insert into input(name) values('ASH_MOTO_VARIATEUR');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_MOTO_VARIATEUR';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_MOTO_VARIATEUR';insert into input(name) values('ASH_TRANS_REMP_ADHERENCE');insert into input_val(value, input_id, title) select '1', i.id, 'Oui' from input i where i.name='ASH_TRANS_REMP_ADHERENCE';insert into input_val(value, input_id, title) select '0', i.id, 'Non' from input i where i.name='ASH_TRANS_REMP_ADHERENCE';insert into input(name) values('ASH_TRANS_TYPE');insert into input_val(value, input_id, title) select '1', i.id, 'Transmission par poulie et courroie syncrone (dentée) ' from input i where i.name='ASH_TRANS_TYPE';insert into input_val(value, input_id, title) select '2', i.id, 'Transmission directe' from input i where i.name='ASH_TRANS_TYPE';


COMMIT;