select count(*) from survey_responses
where response_id=:new_response_id
select 1 from survey_sections where section_id = :section_id
select question_id, question_text, abstract_data_type, presentation_type, required_p
from survey_questions
where section_id = :section_id
and active_p = 't'
order by sort_order
select question_id, question_text, abstract_data_type, presentation_type, required_p
from survey_questions
where section_id = :section_id
and active_p = 't'
order by sort_order
insert into survey_question_responses (response_id, question_id, choice_id)
values (:response_id, :question_id, :response_value)
insert into survey_question_responses (response_id, question_id, choice_id)
values (:response_id, :question_id, :response_value)
insert into survey_question_responses (response_id, question_id, varchar_answer)
values (:response_id, :question_id, :response_value)
insert into survey_question_responses (response_id, question_id, boolean_answer)
values (:response_id, :question_id, :response_value)
insert into survey_question_responses (response_id, question_id, number_answer)
values (:response_id, :question_id, :response_value)
insert into survey_question_responses (response_id, question_id, date_answer)
values (:response_id, :question_id, :response_value)
select type from survey_sections where section_id = :section_id
select name from survey_sections where section_id = :section_id
insert into survey_question_responses
(response_id, question_id, attachment_file)
values
(:response_id, :question_id, :revision_id)