Query failed: select
a.bbs_id
,a.priority
,a.step+ (nvl(a.priority,0)*10000000000) as step2
,a.step
,a.fk_user_id
,a.name
,a.depth
,a.file_id
,a.is_open
,to_char(a.created_at,'YYYY-MM-DD') AS created_at
,to_char(a.created_at,'YYYY-MM-DD HH24:MI:SS') AS created_at2
,(sysdate-a.created_at) as gap
,(select to_char(max(rb.created_at),'YYYY-MM-DD HH24:MI:SS') from bbs rb where rb.parent_bbs_id = a.bbs_id) as reply_at
,a.title
,a.visit
,a.bbs_code
,a.passwd
,a.bcategory_id
,a.likes_count
,'' as bcategory_name
,'' as bcategory_path
,a.parent_bbs_id
,0 as reple_cnt
,0 as comment_cnt
,b.lec_code
,b.star
,b.fk_lms_history_id
,b.essay_qid
,c.lec_title as lecture_name
,CATEGORY_NAME(c.lec_category) as lecture_category
,CATEGORY_VALUE(c.lec_category) as lecture_value
,c.lec_category
,c.fk_tutor_id
,c.lec_info.extract('/lec_info/tutor_text/text()').getStringVal() as tutor_name
,a.view_option_code
,'0' as is_able_to_download
,0 as likes_cnt
from
lecture_bbs b
inner join bbs a on a.bbs_id = b.bbs_id
inner join lecture_info c on b.lec_code = c.lec_code
where
a.bbs_code = ?
and a.is_used = ?
and a.parent_bbs_id is null
and (b.lec_code in )) order by a.created_at desc