select question_id, question_text, s.name as section_desc, required_p, abstract_data_type from survey_questions q, survey_sections s where s.survey_id=:survey_id and s.section_id=q.section_id order by s.sort_key, q.sort_order select label,choice_id from survey_question_choices where question_id=:question_id select user_id from cc_users where email=:email select 1 from users where user_id=:user_id select response_id from survey_responses_latest r, surveys s where r.survey_id=s.survey_id and s.single_response_p='t' and r.creation_user=:user_id and s.survey_id=:survey_id delete from survey_question_responses where response_id=:response_id insert into survey_question_responses(response_id, question_id, choice_id) values (:response_id, :question_id, :choice_id) insert into survey_question_responses(response_id, question_id, varchar_answer) values (:response_id, :question_id, :varchar_answer) insert into survey_question_responses(response_id, question_id, date_answer) values (:response_id, :question_id, :date_answer) insert into survey_question_responses(response_id, question_id, clob_answer) values (:response_id, :question_id, :clob_answer) insert into survey_question_responses(response_id, question_id, boolean_answer) values (:response_id, :question_id, :boolean_answer) insert into survey_question_responses(response_id, question_id, number_answer) values (:response_id, :question_id, :number_answer)