select survey_id from survey_sections where section_id = :section_id select s.*, o.creation_user, o.creation_date, p.first_names || ' ' || p.last_name as creator_name, (case when enabled_p = 't' then 'Enabled' else 'Disabled' end) as enabled_display, (case when single_response_p = 't' then 'One response' else 'Multiple responses' end) as single_response_display, (case when editable_p = 'f' then 'Non-Editable' else 'Editable' end) as editable_display, (case when single_section_p = 'f' then 'Multiple sections' else 'Single section' end) as single_section_display from surveys s, acs_objects o, persons p where o.object_id = :survey_id and s.survey_id = o.object_id and p.person_id = o.creation_user select min(section_id) as section_id from survey_sections where survey_id = :survey_id select count(*) from dotlrn_member_rels_full where rel_type='dotlrn_member_rel' and community_id=:community_id select s.*, o.creation_user, o.creation_date from survey_sections s, acs_objects o where o.object_id = :section_id and s.section_id = o.object_id select max(answer_description), count(*) from survey_block_Sections bs, survey_block_questions bq where section_id=:section_id and bs.block_section_id=bq.block_section_id group by bs.block_section_id, bq.block_section_id order by bs.block_section_id select label,bs.block_section_id from survey_block_questions bq, survey_block_Sections bs where section_id=:section_id and bs.block_section_id=bq.block_section_id order by block_section_id, sort_order select choice_id from survey_question_choices where question_id=:question_id order by sort_order select name, description, description_html_p, block_section_p from survey_sections where section_id=:section_id select choice_id as selected_choice_id from survey_question_responses qr, survey_questions q where section_id=:section_id and q.question_id=qr.question_id and response_id=:response_id select question_id, question_text from survey_questions where section_id=:section_id order by sort_order select section_id, sort_order, question_text, abstract_data_type, required_p, active_p, presentation_type, presentation_options, presentation_alignment, creation_user, creation_date, predefined_question_id from survey_questions, acs_objects where object_id = question_id and question_id = :question_id select action_type,abstract_data_type,table_name,column_name,key_name from survey_predefined_questions where predefined_question_id=:predefined_question_id select question_id as preselect_question_id, object_id as response_id from survey_question_responses, acs_objects where question_id in ( select question_id from survey_questions where predefined_question_id=:predefined_question_id) and object_type='survey_response' and response_id=object_id and creation_date=(select min(creation_date) from survey_question_responses, acs_objects where question_id in ( select question_id from survey_questions where predefined_question_id=:predefined_question_id) and object_type='survey_response' and response_id=object_id) select choice_id, boolean_answer, clob_answer, number_answer, varchar_answer, to_char(date_answer,'YYYY MM DD HH24 MI SS') as date_answer, attachment_answer from survey_question_responses where question_id = :preselect_question_id and response_id = :response_id select choice_id, boolean_answer, clob_answer, number_answer, varchar_answer, to_char(date_answer,'YYYY MM DD HH24 MI SS') as date_answer, attachment_answer from survey_question_responses where question_id = :question_id and response_id = :response_id select name from cr_items i, cr_revisions r where i.item_id=r.item_id and r. revision_id=:attachment_answer select choice_id, label from survey_question_choices where question_id = :question_id order by sort_order select choice_id, label from survey_question_choices where question_id = :question_id order by sort_order select * from survey_question_choices where question_id = :question_id order by sort_order select sq.question_id, sq.section_id, sq.sort_order, sq.question_text, sq.abstract_data_type, sq.required_p, sq.active_p, sq.presentation_type, sq.presentation_options, sq.presentation_alignment, sqr.response_id, sqr.question_id, sqr.choice_id, sqr.boolean_answer, sqr.clob_answer, sqr.number_answer, sqr.varchar_answer, sqr.date_answer, sqr.attachment_answer, s.name as section_name from survey_questions sq, survey_question_responses sqr, survey_sections s where sqr.response_id = :response_id and sq.question_id = sqr.question_id and sq.active_p = 't' and s.section_id=sq.section_id order by s.sort_key,sq.sort_order select name from cr_items i, cr_revisions r where i.item_id=r.item_id and revision_id=:attachment_answer select label from survey_question_choices, survey_question_responses where survey_question_responses.question_id = :question_id and survey_question_responses.response_id = :response_id and survey_question_choices.choice_id = survey_question_responses.choice_id select * from survey_questions where question_id=:question_id update survey_questions set sort_order = sort_order + 1 where section_id = :section_id and sort_order > :after update survey_questions set question_text = :question_text where question_id = :new_question_id select * from survey_question_choices where question_id=:old_question_id insert into survey_question_choices (choice_id, question_id, label, numeric_value, sort_order, presentation_alignment, more_info_type, predef_choice_id) values (:new_choice_id, :new_question_id, :label, :numeric_value, :sort_order, :presentation_alignment, :more_info_type, :predef_choice_id) select * from surveys where survey_id=:survey_id select section_id from survey_sections where survey_id=:survey_id select name, description, description_html_p, sort_key, branch_p, branched_p, block_section_p, page_break_p from survey_sections where section_id=:section_id update survey_sections set description=:description where section_id=:new_section_id select question_id from survey_questions where section_id in (select section_id from survey_sections where survey_id=:survey_id) select survey_id from survey_responses where response_id=:response_id select count(*) from survey_responses_latest where survey_id=:survey_id select count(*) from party_approved_member_map where party_id=:segment_id select sort_order, question_text, question_id from survey_questions where section_id in (select section_id from survey_sections where survey_id=:survey_id) select presentation_options from survey_questions where question_id=:question_id select sort_key from survey_sections where section_id=:section_id select section_id,page_break_p from survey_sections where survey_id=:survey_id and sort_key>:sort_key order by sort_key select question_id,choice_id,boolean_answer from survey_conditions c, survey_branches b where b.section_id=:section_id and b.condition=c.condition_id select 1 from survey_question_responses where response_id=:response_id and question_id=:question_id and (choice_id=:choice_id or boolean_answer=:boolean_answer) select to_char((sort_key-1)/(select max(sort_key) from survey_sections ssec where ssec.survey_id=ss.survey_id)*100,'999') as percentage, status_bar_color from survey_sections ss, surveys s where section_id=:section_id and s.survey_id=ss.survey_id select question_text,abstract_data_type, presentation_type, survey_question_all_choices(question_id) as all_choices from survey_questions where section_id=:section_id select count(*) from survey_responses_latest where survey_id=:survey_id select question_id, abstract_data_type, q.sort_order, question_text 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,q.question_id select title from cr_revisions where revision_id=:attachment_answer