select rownum ro, q.what_id, q.lib_id, q.que_code, q.type_code, q.base_code, q.diff_code, q.knowledge_id, q.ability_code, q.create_user, q.create_time, q.is_big_text, q.parent_id, q.que_version, q.casual, q.choise, q.answer, q.clob_casual, q.clob_choise, q.clob_answer, q.score, q.answer_time, q.source_code, q.source_code as sourceName, q.use_count, q.is_approved, q.is_avail, q.start_time, q.end_time, q.byinfor, q.update_time, q.update_user, (select dir_name from directorys where dir_id = q.lib_id) as lib_name, (select type_name from question_type where type_code = q.type_code) as type_name, (select diff_name from question_difficulty where diff_code = q.diff_code) as diff_name, (select qk_name from question_knowledge where knowledge_id = q.knowledge_id and type_code = 'K') as qk_name, (select ability_name from question_ability where ability_code = q.ability_code) as ability_name, secret from questions q where (end_time >= to_date('2016-09-20 09:54:03.375','YYYY-MM-DD HH24:MI:SS.FF3') or end_time is null) and is_avail = 'Y' and is_approved = 'Y' and parent_id = -1 and q.que_id not in (select impl_que_id from part_question where partition_id in (select pp.partition_id from paper_partition pp where pp.partition_exam_paper = 530501) and impl_que_id is not null) and is_deleted = 'N' /* This line can be executed without commenting it out, and an error will be reported when commented out */ /*and (exam_wh_id in (-11716325) or exam_wh_id = 11716325)*/ and is_course = 'Y' order by update_time desc
The entire sql statement is used in such a time conversion place, and no problems have been found yet, and I will study it carefully after a while.
to_date('2016-09-20 09:32:34.382','yyyy-MM-dd HH24:mi:ss.ff3')
Is it because the following conditions have already filtered out the data, and the time condition has not Time to execute?