select count(short_name)
from survsimp_surveys
where lower(short_name) = lower(:short_name)
insert into survsimp_variables
(variable_id, variable_name)
values
(:variable_id, :variable_name)
insert into survsimp_variables_surveys_map
(variable_id, survey_id)
values
(:variable_id, :survey_id)
insert into survsimp_logic_surveys_map
(logic_id, survey_id)
values
(:logic_id, :survey_id)