by stevekim [SQL Query] 부적합한 식별자 오라클 ORA-00904 [2024.03.01 18:45:20]
xml 문에 있는 쿼리를 호출/돌렸더니 "A"."CHRG_PROFSR_NO": 부적합한 식별자
오류가 납니다. 그래서 아래 오류난 쿼리문을 복사하여 에디터에서 돌리니 바로 되는군요.
쿼리는 정상적인데 XML에서 돌리면 이런 오류가 생길수도 있나요? 처음 보는 현상이라
회사에서 Mybatis를 사용합니다. 디비는 오라클 19c구요.
고수님들의 고견 부탁합니다
-아래-
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00904: "A"."CHRG_PROFSR_NO": 부적합한 식별자
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:632) ~[ojdbc8-21.1.0.0.jar:21.1.0.0.0]
... 120 more
2024-03-01 18:33:19,181 ERROR [jdbc.sqltiming] 5. PreparedStatement.execute() FAILED! select a.open_year as year , a.semstr_cd , a.dept_no as crclm_dept_no , a.sbject_cd , a.grade_cd
as crclm_grade_cd , a.clss , a.compl_se_cd , wu_cmm.codenm.comm (a.compl_se_cd) compl_se_cd_nm
, a.sbject_se_cd , wu_cmm.codenm.comm (a.sbject_se_cd) sbject_se_cd_nm , a.pnt , wu_cmm.codenm.sbj(a.sbject_cd)
sbject_nm , wu_cmm.codenm.dept (a.dept_no) crclm_dept_nm , nvl(a.chrg_profsr_no, 'null') chrg_profsr_no
, wu_cmm.codenm.emp(a.chrg_profsr_no,'y') chrg_profsr_nm , wu_hak.get_prfsr_rprsn (a.open_year,
a.semstr_cd, a.dept_no, a.sbject_cd, a.grade_cd) reprsnt_profsr_no , wu_cmm.codenm.emp(wu_hak.get_prfsr_rprsn
(a.open_year, a.semstr_cd, a.dept_no, a.sbject_cd, a.grade_cd),'y') reprsnt_profsr_nm , a.crclm_year
, (case when nvl2(d.sbjt_goal,1,0) + nvl2(d.edc_sumry,1,0) = 2 then 'O' when nvl2(d.sbjt_goal,1,0)
+ nvl2(d.edc_sumry,1,0) = 1 then '△' else 'x' end) as statement_cd , (case when c.lncs120_cnt
>= 15 then 'O' when c.lncs120_cnt > 0 then '△' else 'x' end) as lncs120_cd , decode(a.atend_excl_at,'Y',0,20)
+ nvl(( select sum(allot) from wu_hak.th_gyog_evl_plan_evl_ty where year = a.open_year and
semstr_cd = a.semstr_cd and dept_no = a.dept_no and sbject_cd = a.sbject_cd and profsr_no =
a.chrg_profsr_no and evl_mth_code not in ('0001','0009') ),0) allot_sum ,( select count(1)
cnt from wu_hak.th_gyog_dgnss_evl_qesitm where year = a.open_year and semstr_cd = a.semstr_cd
and dept_no = a.dept_no and sbject_cd = a.sbject_cd and profsr_no = a.chrg_profsr_no ) qesitm_cnt
, (select count (1) from wu_hak.vo_mapping_ability_2th sa where 1 = 1 and sa.crclm_year = a.crclm_year
and sa.semstr_cd = a.semstr_cd and sa.dept_no = a.dept_no and sa.sbject_cd = a.sbject_cd )
as ability_cnt , (select count (1) from wu_hak.vo_mapping_ability_3th sa where 1 = 1 and sa.crclm_year
= a.crclm_year and sa.semstr_cd = a.semstr_cd and sa.dept_no = a.dept_no and sa.sbject_cd =
a.sbject_cd ) as evl_nm_cnt from wu_hak.vh_lctr_clss a , wu_hak.th_gyog_course_profl_info d
, ( select profsr_no , dept_no , sbject_cd , year , semstr_cd , count(lctre_cn) as lncs120_cnt
from wu_hak.th_gyog_week_lctre_cn where 1=1 and year = '2023' and semstr_cd = '2180100' group
by profsr_no, dept_no, sbject_cd, year, semstr_cd ) c WHERE a.open_year = c.year and a.semstr_cd
= c.semstr_cd and a.dept_no = c.dept_no and a.sbject_cd = c.sbject_cd and a.chrg_profsr_no
= c.profsr_no and a.open_year = d.year (+) and a.semstr_cd = d.semstr_cd (+) and a.dept_no
= d.dept_cd (+) and a.sbject_cd = d.sbjt_no (+) and a.chrg_profsr_no = d.chrg_prof_no (+) and
a.open_year = '2023' and a.semstr_cd = '2180100' and a.dept_no LIKE NVL('','%') order by a.dept_no,
chrg_profsr_nm, a.sbject_cd, a.grade_cd
{FAILED after 3 msec}
java.sql.SQLSyntaxErrorException: ORA-00904: "A"."CHRG_PROFSR_NO": 부적합한 식별자