select 1 from survsimp_surveys where survey_id = :survey_id
select question_id, question_text, abstract_data_type, presentation_type, required_p
from survsimp_questions
where survey_id = :survey_id
and active_p = 't'
order by sort_key
select question_id, question_text, abstract_data_type, presentation_type, required_p
from survsimp_questions
where survey_id = :survey_id
and active_p = 't'
order by sort_key
insert into survsimp_question_responses (response_id, question_id, choice_id)
values (:response_id, :question_id, :response_value)
insert into survsimp_question_responses (response_id, question_id, choice_id)
values (:response_id, :question_id, :response_value)
insert into survsimp_question_responses (response_id, question_id, varchar_answer)
values (:response_id, :question_id, :response_value)
insert into survsimp_question_responses (response_id, question_id, boolean_answer)
values (:response_id, :question_id, :response_value)
insert into survsimp_question_responses (response_id, question_id, number_answer)
values (:response_id, :question_id, :response_value)
insert into survsimp_question_responses (response_id, question_id, date_answer)
values (:response_id, :question_id, :response_value)
select type from survsimp_surveys where survey_id = :survey_id
select name from survsimp_surveys where survey_id = :survey_id
select variable_name, sum(score) as sum_of_scores
from survsimp_choice_scores, survsimp_question_responses, survsimp_variables
where survsimp_choice_scores.choice_id = survsimp_question_responses.choice_id
and survsimp_choice_scores.variable_id = survsimp_variables.variable_id
and survsimp_question_responses.response_id = :response_id
group by variable_name
select logic from survsimp_logic, survsimp_logic_surveys_map
where survsimp_logic.logic_id = survsimp_logic_surveys_map.logic_id
and survey_id = :survey_id
insert into survsimp_question_responses
(response_id, question_id, item_id,
content_length,
attachment_file_name, attachment_file_type,
attachment_file_extension)
values
(:response_id, :question_id, :item_id,
:content_length,
:response_value, :guessed_file_type,
:file_extension)