* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.
|
Window10 64bit |
|
11.0 |
|
sqlgate for cubrid 9.13.3.0 |
|
java, springframework, mybatis |
* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.
에러 내용 및 재현 방법 | 재현 가능한 Source와 SQL |
관련 테이블(인덱스, 키정보 포함) 정보 | CUBRID 홈 디렉토리 아래 log 디렉토리 압축 |
-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------
SpringFrameWork 환경에서 Mybatis를 사용중에 있습니다.
Merge 문을 사용할 일이 있어 아래와 같이 구현을 하였는데 첨부한 에러 메세지가 출력 되네요... 해당 에러에 대한 정보가 없어서
답변 주시면 감사하겠습니다.
---- SQL
<insert id="set_aims_messagetype_u" parameterType="java.util.List">
MERGE INTO COPY_MASTER_FILE R1
USING (
<foreach item="item" index="index" collection="list" separator=" UNION ">
SELECT
#{item.v_UnitsystemId} AS v_UnitsystemId,
#{item.v_MessageId} AS v_MessageId,
#{item.v_DateandTime} AS v_DateandTime,
#{item.v_Ms_Date} AS v_Ms_Date,
#{item.v_Ms_Io} AS v_Ms_Io,
#{item.v_Flight_Num} AS v_Flight_Num,
#{item.v_Ms_Sid} AS v_Ms_Sid,
#{item.v_MessageType} AS v_MessageType,
#{item.v_Month} AS v_Month,
#{item.v_Ms_Line} AS v_Ms_Line,
#{item.v_Ms_Regul} AS v_Ms_Regul,
#{item.v_Ms_Purpo} AS v_Ms_Purpo,
#{item.v_Ms_Delay} AS v_Ms_Delay,
#{item.v_Ms_Cause} AS v_Ms_Cause,
#{item.v_Ms_Code} AS v_Ms_Code,
#{item.v_Mg_Usecode} AS v_Mg_Usecode,
#{item.v_Mg_Ts_Rsg} AS v_Mg_Ts_Rsg,
#{item.v_Mg_Eff_6} AS v_Mg_Eff_6,
#{item.v_Mg_Nff_6} AS v_Mg_Nff_6,
#{item.v_Mg_Trf_6} AS v_Mg_Trf_6,
#{item.v_Mg_Frg_6} AS v_Mg_Frg_6,
#{item.v_Mg_Bag_6} AS v_Mg_Bag_6,
#{item.v_Mg_Mal_6} AS v_Mg_Mal_6,
#{item.v_Mg_Tfrg_6} AS v_Mg_Tfrg_6,
#{item.v_Mg_Bagg_Cnt_6} AS v_Mg_Bagg_Cnt_6,
#{item.v_Ms_Pax} AS v_Ms_Pax,
#{item.v_Ms_Stime} AS v_Ms_Stime
FROM DUAL
</foreach>
) T1
ON (
R1.ms_date = T1.v_Ms_Date
AND R1.ms_io = T1.v_Ms_Io
AND R1.flight_num = T1.v_Flight_Num
AND R1.ms_sid = T1.v_Ms_Sid
AND R1.MS_STIME = T1.v_Ms_Stime
)
WHEN MATCHED THEN
UPDATE
<set>
[MONTH] = T1.v_Month,
MS_LINE = T1.v_Ms_Line,
MS_REGUL = T1.v_Ms_Regul,
MS_PURPO = T1.v_Ms_Purpo,
MS_DELAY = T1.v_Ms_Delay,
MS_CAUSE = T1.v_Ms_Cause,
MS_CODE = T1.v_Ms_Code,
MG_USECODE = T1.v_Mg_Usecode,
MG_TS_RSG = T1.v_Mg_Ts_Rsg,
MG_EFF_6 = T1.v_Mg_Eff_6,
MG_NFF_6 = T1.v_Mg_Nff_6,
MG_TRF_6 = T1.v_Mg_Trf_6,
MG_FRG_6 = T1.v_Mg_Frg_6,
MG_BAG_6 = T1.v_Mg_Bag_6,
MG_MAL_6 = T1.v_Mg_Mal_6,
MG_TFRG_6 = T1.v_Mg_Tfrg_6,
MG_BAGG_CNT_6 = T1.v_Mg_Bagg_Cnt_6,
MS_PAX = T1.v_Ms_Pax
</set>
WHEN NOT MATCHED THEN
INSERT
<trim prefix="(" suffix=")" suffixOverrides=",">
MS_DATE,
MS_IO,
FLIGHT_NUM,
MS_SID,
[MONTH],
MS_LINE,
MS_REGUL,
MS_PURPO,
MS_DELAY,
MS_CAUSE,
MS_CODE,
MG_USECODE,
MG_TS_RSG,
MG_EFF_6,
MG_NFF_6,
MG_TRF_6,
MG_FRG_6,
MG_BAG_6,
MG_MAL_6,
MG_TFRG_6,
MG_BAGG_CNT_6,
MS_PAX,
MS_STIME
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
T1.v_Ms_Date,
T1.v_Ms_Io,
T1.v_Flight_Num,
T1.v_Ms_Sid,
T1.v_Month,
T1.v_Ms_Line,
T1.v_Ms_Regul,
T1.v_Ms_Purpo,
T1.v_Ms_Delay,
T1.v_Ms_Cause,
T1.v_Ms_Code,
T1.v_Mg_Usecode,
T1.v_Mg_Ts_Rsg,
T1.v_Mg_Eff_6,
T1.v_Mg_Nff_6,
T1.v_Mg_Trf_6,
T1.v_Mg_Frg_6,
T1.v_Mg_Bag_6,
T1.v_Mg_Mal_6,
T1.v_Mg_Tfrg_6,
T1.v_Mg_Bagg_Cnt_6,
T1.v_Ms_Pax,
T1.v_Ms_Stime
</trim>
</insert>
---- ERROR
### Error updating database. Cause: cubrid.jdbc.driver.CUBRIDException: Unknown savepoint name UmsP_2
### The error may involve apimanager.eaiproc.mapper.PrAimsGenMsgMapper.set_aims_messagetype_u-Inline
### The error occurred while setting parameters
### SQL: MERGE INTO COPY_MASTER_FILE R1 USING ( SELECT ? AS v_UnitsystemId, ? AS v_MessageId, ? AS v_DateandTime, ? AS v_Ms_Date, ? AS v_Ms_Io, ? AS v_Flight_Num, ? AS v_Ms_Sid, ? AS v_MessageType, ? AS v_Month, ? AS v_Ms_Line, ? AS v_Ms_Regul, ? AS v_Ms_Purpo, ? AS v_Ms_Delay, ? AS v_Ms_Cause, ? AS v_Ms_Code, ? AS v_Mg_Usecode, ? AS v_Mg_Ts_Rsg, ? AS v_Mg_Eff_6, ? AS v_Mg_Nff_6, ? AS v_Mg_Trf_6, ? AS v_Mg_Frg_6, ? AS v_Mg_Bag_6, ? AS v_Mg_Mal_6, ? AS v_Mg_Tfrg_6, ? AS v_Mg_Bagg_Cnt_6, ? AS v_Ms_Pax, ? AS v_Ms_Stime FROM DUAL UNION SELECT ? AS v_UnitsystemId, ? AS v_MessageId, ? AS v_DateandTime, ? AS v_Ms_Date, ? AS v_Ms_Io, ? AS v_Flight_Num, ? AS v_Ms_Sid, ? AS v_MessageType, ? AS v_Month, ? AS v_Ms_Line, ? AS v_Ms_Regul, ? AS v_Ms_Purpo, ? AS v_Ms_Delay, ? AS v_Ms_Cause, ? AS v_Ms_Code, ? AS v_Mg_Usecode, ? AS v_Mg_Ts_Rsg, ? AS v_Mg_Eff_6, ? AS v_Mg_Nff_6, ? AS v_Mg_Trf_6, ? AS v_Mg_Frg_6, ? AS v_Mg_Bag_6, ? AS v_Mg_Mal_6, ? AS v_Mg_Tfrg_6, ? AS v_Mg_Bagg_Cnt_6, ? AS v_Ms_Pax, ? AS v_Ms_Stime FROM DUAL UNION SELECT ? AS v_UnitsystemId, ? AS v_MessageId, ? AS v_DateandTime, ? AS v_Ms_Date, ? AS v_Ms_Io, ? AS v_Flight_Num, ? AS v_Ms_Sid, ? AS v_MessageType, ? AS v_Month, ? AS v_Ms_Line, ? AS v_Ms_Regul, ? AS v_Ms_Purpo, ? AS v_Ms_Delay, ? AS v_Ms_Cause, ? AS v_Ms_Code, ? AS v_Mg_Usecode, ? AS v_Mg_Ts_Rsg, ? AS v_Mg_Eff_6, ? AS v_Mg_Nff_6, ? AS v_Mg_Trf_6, ? AS v_Mg_Frg_6, ? AS v_Mg_Bag_6, ? AS v_Mg_Mal_6, ? AS v_Mg_Tfrg_6, ? AS v_Mg_Bagg_Cnt_6, ? AS v_Ms_Pax, ? AS v_Ms_Stime FROM DUAL UNION SELECT ? AS v_UnitsystemId, ? AS v_MessageId, ? AS v_DateandTime, ? AS v_Ms_Date, ? AS v_Ms_Io, ? AS v_Flight_Num, ? AS v_Ms_Sid, ? AS v_MessageType, ? AS v_Month, ? AS v_Ms_Line, ? AS v_Ms_Regul, ? AS v_Ms_Purpo, ? AS v_Ms_Delay, ? AS v_Ms_Cause, ? AS v_Ms_Code, ? AS v_Mg_Usecode, ? AS v_Mg_Ts_Rsg, ? AS v_Mg_Eff_6, ? AS v_Mg_Nff_6, ? AS v_Mg_Trf_6, ? AS v_Mg_Frg_6, ? AS v_Mg_Bag_6, ? AS v_Mg_Mal_6, ? AS v_Mg_Tfrg_6, ? AS v_Mg_Bagg_Cnt_6, ? AS v_Ms_Pax, ? AS v_Ms_Stime FROM DUAL UNION SELECT ? AS v_UnitsystemId, ? AS v_MessageId, ? AS v_DateandTime, ? AS v_Ms_Date, ? AS v_Ms_Io, ? AS v_Flight_Num, ? AS v_Ms_Sid, ? AS v_MessageType, ? AS v_Month, ? AS v_Ms_Line, ? AS v_Ms_Regul, ? AS v_Ms_Purpo, ? AS v_Ms_Delay, ? AS v_Ms_Cause, ? AS v_Ms_Code, ? AS v_Mg_Usecode, ? AS v_Mg_Ts_Rsg, ? AS v_Mg_Eff_6, ? AS v_Mg_Nff_6, ? AS v_Mg_Trf_6, ? AS v_Mg_Frg_6, ? AS v_Mg_Bag_6, ? AS v_Mg_Mal_6, ? AS v_Mg_Tfrg_6, ? AS v_Mg_Bagg_Cnt_6, ? AS v_Ms_Pax, ? AS v_Ms_Stime (String)